• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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