JASS problem

satino

Member
Reaction score
4
Hello im learning JASS and I got a problem.Everytime I create a trigger and convert it to a custom text and I test map,it don't work and it show me this :
ff49z7.jpg
please help me.
 

Hero

─║╣ero─
Reaction score
250
Try taking out the space between the CreateTrigger( )

Make it like

CreateTrigger()

If that doesn't solve the problem then that is some weird stuff that I have never seen.
 

saw792

Is known to say things. That is all.
Reaction score
280
Don't use the TESH check syntax button.

Save the map first and then use test map. Otherwise just circumvent the problem by replacing
JASS:
set gg_trg_Melee_Initialization...
with
JASS:
and replace all 'gg_trg_Melee_Initialization' with 't'.
 

satino

Member
Reaction score
4
That problem is corrected but now there is a error here :
JASS:

function Trig_Melee_Initialization_Actions takes nothing returns nothing
    call MeleeStartingVisibility(  )
    call MeleeStartingHeroLimit(  )
    call MeleeGrantHeroItems(  )
    call MeleeStartingResources(  )
    call MeleeClearExcessUnits(  )
    call MeleeStartingUnits(  )
    call MeleeStartingAI(  )
    call MeleeInitVictoryDefeat(  )
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
    local trigger t = CreateTrigger())
    call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

The probelm is now in call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction.
 

satino

Member
Reaction score
4
This was an error a correct before but the problem is in call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction.It tell that the variable gg_trg_Melee_Initialization do not exist.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
As Chocobo already stated, you have an extra paranthesis (marked with red) which has to be removed.

Code:
function InitTrig_Melee_Initialization takes nothing returns nothing
    local trigger [B][COLOR="SeaGreen"]t[/COLOR][/B] = CreateTrigger()[B][COLOR="Red"])[/COLOR][/B]
    call TriggerAddAction( [B][COLOR="RoyalBlue"]gg_trg_Melee_Initialization[/COLOR][/B], function Trig_Melee_Initialization_Actions )
endfunction

In addition, like wraithseeker told you, you need to replace the "gg_trg_Melee_Initialization" variable (marked with blue)
with the newly declared one, "t" (marked in green), in order to add the actions to the trigger.


P.S, Hero,

Empty space does not matter, meaning,

Code:
call CreateTrigger()
call CreateTrigger(    )
call     CreateTrigger      ()

are all the same.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top