- Joined
- Mar 1, 2009
- Messages
- 2
I'm new to JASS and im having some trouble with this simple function (to people that know what they are doing) that is supposed to take anything you say and put it on the screen, but it isn't working properly and i can't figure out why.
here is what i have...
here is what i have...
JASS:
function alltext takes string message returns nothing
call DisplayTextToForce(GetPlayersAll(), message)
endfunction
function TextToAll takes nothing returns nothing
call alltext(GetEventPlayerChatString())
endfunction
function InitTrig_RUN takes nothing returns nothing
local trigger myTrigger = CreateTrigger()
call TriggerRegisterPlayerChatEvent(myTrigger, Player(0), "", true)
call TriggerAddAction(myTrigger, function TextToAll)
set myTrigger = null
endfunction