• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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