Okay, complex problem! Maybe. Syntax error in skill formula.

kogunenjou

Well-Meaning Amateur
Member
Joined
Sep 3, 2013
Messages
22
Reaction score
0
First Language
English
Primarily Uses
Hi, RPG Maker community. Again. For the second time in less than a week. n_n' /

The move's description is as follows:

The user inflicts damage on himself in order to deal
massive Dark damage to the enemy.


The move's formula is as follows:

c=(a.atk*6 + a.mat*6) - b.def * 3; a.hp-=(a.hp*0.25).to_i;c.

I hope it's not something embarrassingly simple like my last thread topic.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
That formula is needlessly complex, you can write it easier in the following way:

Code:
a.hp -= a.hp*0.25; a.atk * 6 + a.mat * 6 - b.def * 3
Without seeing the error message I don't know what the original error was, but it might be missing spaces (some spaces are needed for the interpreter to know what goes where).
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
564
Reaction score
275
First Language
German
Primarily Uses
Is that dot at the end of the line part of your formula?
 

Sometimes it helps just to erase the formula and rewrite it.
 

kogunenjou

Well-Meaning Amateur
Member
Joined
Sep 3, 2013
Messages
22
Reaction score
0
First Language
English
Primarily Uses
That formula is needlessly complex, you can write it easier in the following way:

a.hp -= a.hp*0.25; a.atk * 6 + a.mat * 6 - b.def * 3Without seeing the error message I don't know what the original error was, but it might be missing spaces (some spaces are needed for the interpreter to know what goes where).
Thank you, that fixed it. I'm not very familiar with the syntax that the formula box uses.

Is that dot at the end of the line part of your formula?

Sometimes it helps just to erase the formula and rewrite it.
It is, yes. I use variations of this formula for other skills, but this was the only one giving me a syntax error.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top