• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

JASS function help

Status
Not open for further replies.
Level 1
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...

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
 
Status
Not open for further replies.
Top