- Joined
- Mar 24, 2011
- Messages
- 1,082
Greetings
Earlier, after getting annoyed with GUI/JASS I decided to switch to JASS full-time... So, I converted part of my trigger to JASS and decided to write the rest myself... if it was a success I would not be starting this thread, would I ?
So I have this thing which gives me the annoying error of "Expected a function name":
I am pretty sure that it is correct because it is just a converted GUI line with custom function name and I searched and looked through... a lot of threads and spells around to see if the syntax is wrong... so any suggestions ?
PS: I take suggestions and criticism about improving the code as I am not knowledgeable of JASS at all...
Earlier, after getting annoyed with GUI/JASS I decided to switch to JASS full-time... So, I converted part of my trigger to JASS and decided to write the rest myself... if it was a success I would not be starting this thread, would I ?
So I have this thing which gives me the annoying error of "Expected a function name":
JASS:
set udg_TempUnitGroup = GetUnitsInRangeOfLocMatching(udg_SVA_Range, udg_TempPoint, Condition(function CheckForAbility))
JASS:
function EnumGroup takes nothing returns nothing
local integer array LevelMax
set udg_TempUnitGroup = GetUnitsInRangeOfLocMatching(udg_SVA_Range, udg_TempPoint, Condition(function CheckForAbility))
set udg_TempInt = CountUnitsInGroup(udg_TempUnitGroup)
set udg_TempPoint = GetUnitLoc(udg_PDD_source)
set udg_TempLoopIndex = 0
endfunction
function CheckForAbility takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A002', GetFilterUnit()) > 0 )
endfunction
JASS:
function Trig_SVADetection_Actions takes nothing returns nothing
if ( Trig_SVADetection_Func001C() ) then
call EnumGroup()
else
endif
endfunction
PS: I take suggestions and criticism about improving the code as I am not knowledgeable of JASS at all...