• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

JASS function help

Status
Not open for further replies.

SirPsychoSexy

S

SirPsychoSexy

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.
Back
Top