HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Nova Template Compile errors

01-24-2007, 12:52 AM#1
Pyrogasm
I'm getting an "Invalid number of arguments" compile error from this line:
Collapse JASS:
call SetAbilityDataReal(s,"speed",0,400)    //400 speed for all levels

I realize that it says "Real", and I have input an integer value for the second line, but it does not work even with a real value. Additionally, the line call SetAbilityDataReal(s,"speed" ,0,200 ) //200 of speed for all levels does not yield a compile error.

Furthermore, if I C 'n P the line call SetAbilityDataReal(s,"speed" ,0,200 ) //200 of speed for all levels, which compiles fine, over where the line call SetAbilityDataReal(s,"speed",0,400) //400 speed for all levels without changing anything... I end up with a compile error

I'm baffled.

The Configuration Code

[jass]//===================================================================================================
// Poison Nova (Dr. Detritigus) ('A07V')
//
set s=SetSpellTemplate('A07V',"NovaSpellTemplate")
set D=0 //Poison Nova Options :
set D=DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_ACID) //Spell acid damage
set D=D+DamageOnlyEnemies() //Only hurts enemies
set D=CreateDamageOptions(D) //Save the damage options

call SetAbilityDataInt(s,"n",0,25) //25 missiles
call SetAbilityDataReal(s,"dur",0,2.5 ) //Duration is 2.5 seconds
call SetAbilityDataInt(s,"turninc",3 ) //Turning value is 3
call SetAbilityDataReal(s,"speed" ,0,400 ) //400 speed for all levels
call SetAbilityDataReal(s,"collision",0,25 ) //25 collision
call SetAbilityDataInt(s,"TargetLog",0, 1 ) //Always log targets

call SetAbilityDataReal(s,"dmg",1,75) //Level 1: 75 initial damage
call SetAbilityDataReal(s,"dmg",2,150) //Level 2: 150 initial damage
call SetAbilityDataReal(s,"dmg",3,225) //Level 3: 225 initial damage

call SetAbilityDataReal(s,"Pdmg",1,40) //Level 1: 40 Periodic damage
call SetAbilityDataReal(s,"Pdmg",2,60) //Level 2: 60 periodic damage
call SetAbilityDataReal(s,"Pdmg",3,80) //Level 3: 80 Periodic damage

call SetAbilityDataReal(s,"PdmgDur",0,5) //Periodic damage lasts 5 seconds at all levels

call SetAbilityDataInt( s,"damageoptions",0,D) //Using the damage options saved above
[/jass



Edit Rant: WTF? I just removed that line entirely, and the line that was moved up into it's place is now giving me compile errors! And I DIDN'T EVEN TOUCH IT! Ack! I then tried to re-insert the line I omitted using "//" and putting a blank line in there instead but it still said the new line (call SetAbilityDataReal(s,"collision",0,25) //25 collision) has an "invalid number of arguments! Now I'm really pissed.
01-24-2007, 01:06 AM#2
Vexorian
Stop, stop using World Editor's normal compiler if you plan to ever modiffy Jass Code, it gives the wrong error line, the actual error is in call SetAbilityDataInt(s,"turninc",3 )
you miss the level arg
01-24-2007, 01:54 AM#3
Pyrogasm
Why thank you, Vex. I don't see why I overlooked that.