Im trying to learn JASS through the first guide of Vexorian, but I've encountered a problem and really can't see what I'm doing wrong.
This is the trigger at map initialization, which should be a global variable according to the guide:
Then there's the function that calls the global variable from above to get the unit name of gg_unit_hsor0002:
Now if I change the number for the unit to 0000 (which it is for me) and I write the last function under the first, it still doesn't work. If i put the call command from the last function into the first, it actually does work, so i think the problem is that the first one isn't global. Problem is I don't know what to do about that.
Oh and is it possible for me to learn JASS while I never worked with the GUI before?
This is the trigger at map initialization, which should be a global variable according to the guide:
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Untitled_Trigger_001, gg_unit_hsor_0002, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
Then there's the function that calls the global variable from above to get the unit name of gg_unit_hsor0002:
JASS:
function Trig_JASS_test_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), GetUnitName(gg_unit_hsor_0002) )
endfunction
Now if I change the number for the unit to 0000 (which it is for me) and I write the last function under the first, it still doesn't work. If i put the call command from the last function into the first, it actually does work, so i think the problem is that the first one isn't global. Problem is I don't know what to do about that.
Oh and is it possible for me to learn JASS while I never worked with the GUI before?