| 04-08-2007, 02:06 AM | #1 |
I've been receiving an error with my spell script. The trigger is designed to simulate the Blizzard spell, dealing damage based on Intelligence over several waves. I have not completed it yet, and I already have many things in mind for making it more visually and functionally appealing. This is my first JASS script. I'm including only the actions part. JASS:function Trig_Blizzard_Test_Copy_Actions takes nothing returns nothing local unit u = GetTriggerUnit() local real inte = I2R(GetHeroInt( u , true)) local integer level = GetUnitAbilityLevel( u , GetSpellAbilityId()) local location t = GetSpellTargetLoc() local real tx = GetLocationX( t ) local real ty = GetLocationY( t ) local effect se local real t2x local real t2y local integer a1 local integer a2 local integer b1 local integer b2 call RemoveLocation( t ) set t = null set a1 = 1 set a2 = ( level * 2 ) loop exitwhen a1 > a2 set b1 = 1 set b2 = ( level * 3 ) loop exitwhen b1 > b2 set t2x = tx + GetRandomReal(0, 350.00) * Cos(GetRandomReal(0, 360.00) * bj_DEGTORAD) set t2y = ty + GetRandomReal(0, 350.00) * Sin(GetRandomReal(0, 360.00) * bj_DEGTORAD) set se = call AddSpecialEffect( "Abilities\\Spells\\Human\\Blizzard\\BlizzardTarget.mdl", t2x , t2y ) call DestroyEffect( se ) set b1 = b1 + 1 endloop call UnitDamagePoint( u , 0.75, 500, tx , ty , ( inte * 2.00), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_COLD, WEAPON_TYPE_WHOKNOWS) call TriggerSleepAction( 1.00 ) set a1 = a1 + 1 endloop set se = null set u = null endfunction The highlighted text is where the compile error occurs. The WE states that it expected an expression when I try to save and JASSshopPro states a parse error on that line. I would like to know what I'm doing wrong. I've already found a working alternative, but it uses non-native functions and one more location than I'd like. Also, I tried this: call DestroyEffect( call AddSpecialEffect( "Abilities\\Spells\\Human\\Blizzard\\BlizzardTarget.mdl", t2x , t2y ) ) It gave me a compile error as well. |
| 04-08-2007, 02:14 AM | #2 |
You shouldn't have "call" in front of it in either case. That is only when you are calling something just to execute it, and not setting it to a variable (if that makes sense). So it should be.. JASS:set se = AddSpecialEffect( "Abilities\\Spells\\Human\\Blizzard\\BlizzardTarget.mdl", t2x , t2y ) |
| 04-08-2007, 02:21 AM | #3 |
Ah, that makes sense. Thank you for the helpful response. |
