- Joined
- Oct 31, 2010
- Messages
- 238
Hi all. I am new to JASS. (Started learning yesterday) . And I am a new member of Hiveworkshop.
I have a problem with that event.
I wanted to use a global string variable (udg_STRING) but failed.
I typed anything and it just executed the actions.
Here's my script:
Global variables:
udg_RandomString[1] = .......
udg_RandomString[2] = .......
udg_RandomInteger = Random Integer between 1 and 2
Help would be very much appreciated
I have a problem with that event.
JASS:
TriggerRegisterPlayerChatEvent( gg_trg_TRIGGER, Player(0), udg_STRING, true)
I typed anything and it just executed the actions.
Here's my script:
Global variables:
udg_RandomString[1] = .......
udg_RandomString[2] = .......
udg_RandomInteger = Random Integer between 1 and 2
JASS:
function Trig_TRIGGER_Actions takes nothing returns nothing
------ALL MY CODE HERE
endfunction
//===========================================================================
function InitTrig_TRIGGER takes nothing returns nothing
set gg_trg_TRIGGER = CreateTrigger( )
set udg_STRING = udg_RandomString[udg_RandomInteger]
call TriggerRegisterPlayerChatEvent( gg_trg_TRIGGER, Player(0), udg_STRING, true )
call TriggerAddAction( gg_trg_TRIGGER, function Trig_TRIGGER_Actions )
endfunction
Help would be very much appreciated