Hello,
i am very new to writing JASS Code, though being a Software Developer familiar with the genre itself.
I am now trying to write some simple custom spells, using JassCraft and GUI -> Jass Translation as base of finding the functions that i need to implement desired functionality.
So far its working quite well, im getting a hang of the naming conventions in order to guess function names that do what i am looking for (i search for what i think certain functions should be called in JassCraft and check the function protoype).
But now i am encountering some kind of syntax error that i cant seem to get behind, here is the code:
I am getting an error message, stating "Expecting function name" for the line in which i call DamageUnitGroup.
I have looked up the prototype of this function in JassCraft and i pass parameters matching this - i cant really seem to understand what is wrong here.
When i parse the entire thing in JassCraft, there seem to be no errors. So it seems, that the WorldEditor must have some kind of different definition of DamageUnitGroup than what JassCraft tells me?
That or i simply have some different syntax-error that i cannot see, being really new to this script language.
2. Another Question: Is the way i approach finding functions the "best practice" or is there a smarter way of doing it?
I am really used to developing in well documented languages / APIs, where i can easily lookup stuff, say like MSDN, which, understandably, is not the case for Jass.
Thanks in advance
i am very new to writing JASS Code, though being a Software Developer familiar with the genre itself.
I am now trying to write some simple custom spells, using JassCraft and GUI -> Jass Translation as base of finding the functions that i need to implement desired functionality.
So far its working quite well, im getting a hang of the naming conventions in order to guess function names that do what i am looking for (i search for what i think certain functions should be called in JassCraft and check the function protoype).
But now i am encountering some kind of syntax error that i cant seem to get behind, here is the code:
JASS:
function Trig_Arcane_Blast_IsEnemyUnit takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetTriggerUnit())) == true)
endfunction
function Trig_Arcane_Blast_Actions takes nothing returns nothing
local group enemyUnits = GetUnitsInRangeOfLocMatching(250, GetSpellTargetLoc(), Condition(function Trig_Arcane_Blast_IsEnemyUnit))
call DamageUnitGroup(GetOwningPlayer(GetTriggerUnit()), 3 * GetHeroInt(GetTriggerUnit(), true), enemyUnits)
set enemyUnits = null
endfunction
I am getting an error message, stating "Expecting function name" for the line in which i call DamageUnitGroup.
I have looked up the prototype of this function in JassCraft and i pass parameters matching this - i cant really seem to understand what is wrong here.
When i parse the entire thing in JassCraft, there seem to be no errors. So it seems, that the WorldEditor must have some kind of different definition of DamageUnitGroup than what JassCraft tells me?
That or i simply have some different syntax-error that i cannot see, being really new to this script language.
2. Another Question: Is the way i approach finding functions the "best practice" or is there a smarter way of doing it?
I am really used to developing in well documented languages / APIs, where i can easily lookup stuff, say like MSDN, which, understandably, is not the case for Jass.
Thanks in advance