- Joined
- Sep 8, 2008
- Messages
- 15
I'm trying to understand locals.
Pseudocode:
--Run on Map Initialization--
Create Global String
Create Local String and Set Global String to it
Display Local String
But now I've run into another problem.. it won't even display the WTF? text I manually put in. I called remove, but it still wont work. What am I doing wrong here? ::explodes::
Furthermore, I tried this:
This created a fatal error.
I've programmed games in VB, so this is really driving me insane. Please help.
So I know now that the second example crashes because I don't give it the values it's looking for in the remove function (string, wait).
Doesn't Work]
----------------------------
Pseudocode:
--Run on Map Initialization--
Create Global String
Create Local String and Set Global String to it
Display Local String
But now I've run into another problem.. it won't even display the WTF? text I manually put in. I called remove, but it still wont work. What am I doing wrong here? ::explodes::
JASS:
function Message takes string test , real wait returns nothing
call TriggerSleepAction(wait)
call DisplayTextToForce( GetPlayersAll(), test )
call DisplayTextToForce( GetPlayersAll(), "WTF?" )
endfunction
//===========================================================================
function InitTrig_start takes nothing returns nothing
set gg_trg_start = CreateTrigger( )
set udg_string = ("Am I getting this???")
call Message (udg_string, 1.00)
endfunction
Furthermore, I tried this:
JASS:
function Message takes string test , real wait returns nothing
call TriggerSleepAction(wait)
call DisplayTextToForce( GetPlayersAll(), test )
call DisplayTextToForce( GetPlayersAll(), "WTF?" )
endfunction
//===========================================================================
function InitTrig_start takes nothing returns nothing
set gg_trg_start = CreateTrigger( )
set udg_string = ("Am I getting this???")
call TriggerAddAction (gg_trg_start, function Message)
endfunction
I've programmed games in VB, so this is really driving me insane. Please help.
So I know now that the second example crashes because I don't give it the values it's looking for in the remove function (string, wait).
JASS:
TriggerAddAction(gg_trg_start, function Message ("Musu",'1'))
----------------------------
Last edited: