I have a problem with rpgmaker XP 1.05 and the Alternate Attack Algorithms scripts. I have the same problem with Xelias's script AND Phoenixfire's script.
I has tested each scripts in a empty project.
For PhoenixFire
[spoiler]http://rmrk.net/index.php/topic,48835.0.html[/spoiler]
NoMethodError
Undefined method "*" for nil:NilClass
And for Xelias
[spoiler]http://forum.chaos-project.com/index.php/topic,4947.0.html[/spoiler]
NoMethodError
Undefined method "*=" for nil:NilClass
I'm not an expert in script but i don't really understand why the software make an error for that, although Game_battler 1 use that "*" without problem
It usually means that it can't multiply because it doesn't exist/is equal to nil.
Ok but why ? The scripts seems to not have problems in general and the both doesn't work in a new installation of rpgmakerxp and a new project. I don't understand Oo
Actually there might be something wrong with 1.05 of xp. I remember writing a script and getting an error because I did:
def something(arg1=0,arg2)
It was fixed by doing:
def something(arg1 = 0, arg2 = 0)
So as you can see, it was an out of place syntax error, as the first version was ripped from my old 1.02 project, which worked. I think it also caused random '*' errors aswell. You have to mess with the syntax a bit, or downgrade, which is what I did.
I have a steam release, so i can't downgrade, or i don't know how. I will try to modify the syntax...
I would actually be curious to know if either of you come up with a solution to this one. I never heard of that issue, but if there's a way to make this compatible with 1.05 too, I'll be updating my scripts with that..
I'm not enough skilled into Ruby and RGSS to modify. :/
I don't thing it's a problem of syntax of "*=" because we can find that sort of code :
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 999999].min
return n
end
And there a no problem :/