HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jasshelper changing my code?

09-27-2009, 08:00 AM#1
T3RMINUS
The compiler is doing something very weird. My code that i typed in looks like this:
Collapse JASS:
function Stop takes nothing returns nothing
    call PauseUnit(GetEnumUnit(), true)
endfunction

function Trig_MazeInit_Actions takes nothing returns nothing
 local integer i
 local group g
    loop
        exitwhen i == bj_MAX_PLAYERS
        set g = GetUnitsOfPlayerAll(ConvertedPlayer(i))
        call ForGroup(g, Stop)
        set i = i+1
    endloop
endfunction

//===========================================================================
function InitTrig_MazeInit takes nothing returns nothing
    set gg_trg_MazeInit = CreateTrigger(  )
    call TriggerRegisterVariableEvent(gg_trg_MazeInit, "levelCount", EQUAL, 25)
    call TriggerAddAction( gg_trg_MazeInit, function Trig_MazeInit_Actions )
endfunction

But on the window that comes up it looks like this:
Collapse JASS:
function Stop takes nothing returns nothing
    call PauseUnit(GetEnumUnit() , true)
endfunction

function Trig_MazeInit_Actions takes nothing returns nothing
 local integer i
 local group g
    loop
        exitwhen i == bj_MAX_PLAYERS
        set g = GetUnitsOfPlayerAll(ConvertedPlayer(i))
        call ForGroup(g , (1))
        set i = i + 1
    endloop
endfunction

//===========================================================================
function InitTrig_MazeInit takes nothing returns nothing
    set gg_trg_MazeInit = CreateTrigger()
    call TriggerRegisterVariableEvent(gg_trg_MazeInit , "levelCount" , EQUAL , 25)
    call TriggerAddAction(gg_trg_MazeInit , function Trig_MazeInit_Actions)
endfunction
09-27-2009, 08:12 AM#2
TriggerHappy
call ForGroup(g, Stop)
->
call ForGroup(g, function Stop)
09-27-2009, 09:15 AM#3
DioD
this is crush prevention mechanism.
09-27-2009, 06:31 PM#4
T3RMINUS
I assume you mean crash?