[JASS] What is wrong with this function?

Status
Not open for further replies.
Level 2
Joined
Jun 18, 2008
Messages
6
JASS:
function DarkPower takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local location castloc = GetUnitLoc(caster)
local location orderloc = GetSpellTargetLoc()
local string modelpath = "Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl"
call DamagingProjectileLaunchAOELoc(caster, modelpath, 1000, 0, castloc, 10, orderloc, 10, 100, 1, false, 1)
endfunction

JassCrat don't find any syntax mistakes. But WE don't want to save this :sad:

Sorry for my English :)
 
Level 10
Joined
Sep 6, 2007
Messages
440
Hmm perhaps the numbers you wrote are supposed to be reals and must be written with for example 10 as 10. in real value at Jass. Try that and see if it works. ( BTW you won't do this to all of them, just check the function at JC and find where it wants the real variables to be put on. )
 
Level 2
Joined
Jun 18, 2008
Messages
6
JC shows function in that way
JASS:
function DamagingProjectileLaunchAOELoc takes unit hurter, string modelpath, real speed, real arc, location loc1, real z1, location loc2, real z2, real aoeradius, real damage, boolean affectallied, integer DamageOptions returns unit
    return DamagingProjectileLaunchAOE(hurter,modelpath,speed,arc,GetLocationX(loc1),GetLocationY(loc1),z1,GetLocationX(loc2),GetLocationY(loc2),z2, aoeradius, damage, affectallied, DamageOptions )
endfunction
WE says(or writes :) ) that function name missing(or something like that, I have localized version of WE)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
If it wants reals and you input integers- that is no problem(or so it is in JNGP).
But I agree that the problem is in the way you call DamagingProjectileLaunchAOELoc.
I have no idea what system you are using, etc.
But I would suggest instead of using this local unit caster = GetSpellAbilityUnit(), use this local unit caster = GetTriggerUnit()

P.s. What is z?
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Can we see the whole trigger? I somehow have a feeling that you made a huge mistake (which happens to every beginner, don't worry).

EDIT: Whoops, didn't see all the posts. You're using a function from Vexorian's CasterSystem and you didn't implement that system in your map. I bet in 10$ that is the problem.

P.S. You would also need NewGen...
 
Status
Not open for further replies.
Top