Call Function won't work

T

The_ChRiS

Guest
I've been working on a trigger and it won't work, i don't understand why though... Please help!

Here's trigger 1...
Code:
function CallColors takes nothing returns nothing
    set udg_Colors[1]="|cffff0000"
    set udg_Colors[2]="|cooff3200"
endfunction

//========================================================
function InitTrig_Game_Functions takes nothing returns nothing    
endfunction

And here is the init. trigger that won't call the CallColors function!

Code:
function Trig_Init_Actions takes nothing returns nothing
    call CallColors
endfunction

//========================================================
function InitTrig_Init takes nothing returns nothing
    set gg_trg_Init = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Init, function Trig_Init_Actions )
endfunction
 

corvusHaunt

New Member
Reaction score
96
You must designate the parameters. Use
Code:
call CallColors[COLOR=Red]()[/COLOR]
If a function takes something, you put it in the parentheses, if not, leave them empty.

For example:
Code:
function Whatever takes integer i returns nothing
  (does stuff with i)
endfunction

function Blah takes nothing returns nothing
   local integer myInteger=5
    call Whatever(myInteger)
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top