ID:140937
 
Code: command_text
    ChatPopUp()
set hidden=1
switch(input("What would you like to do?","Select",text)in list("Say Chat","World Chat","Marco","Cancel"))
if("Say Chat")
usr.client.command_text="S-Chat \""
if("World Chat")
usr.client.command_text="W-Chat \""
if("Marco")
usr.client.command_text=".alt"


Problem description:

When I try it and I say something, it will say:

"Unrecognized or inaccessible verb: W-Chat"

So how can I connect this to the World Chat verb?
please help.

Is W-Chat the name of the verb? If so, can usr use the verb?
In response to Demon_F0rce
nope verb is "World_Chat"
In response to CoolieZaheer
Well, you might want to try setting the text macro to World_Chat ", since that's what you want to call.
In response to Demon_F0rce
Oh, so like if i set the verb to "W_Chat" would it work if i do the same to the command_text?
In response to CoolieZaheer
What's in the input textbox has to be what you're calling. Example:

You have a verb called Kill.

To use said verb, you must type in Kill.

You have another verb called Hearsay.

To use this one, you must type in Hearsay.

A variation of either will not work, and Dream Seeker will only look at you funny and say "Oi, what is this make-believe verb you're feeding me?"
In response to Demon_F0rce
Who do I Exactly put for command_text?

The World Chat Verb is W_Chat

And the command_text code is this:

usr.client.command_text="W_Chat \""


Which means this is the problem i just need to know what has to edit or fix there.
In response to CoolieZaheer
Okay, I made the mistake here XD. Okay, so _ are replaced by - when dealing with command_text and macros. Take note, the most likely fault here is the ". Do you have something defined as a message for your W_Chat verb? If you have no idea what I'm saying, could you please show me said verb?
In response to Demon_F0rce
    W_Chat()
set category="Menu"
if(usr.banished==1)
usr<<output("<font color=red><b>Error:</b> You are in jail..</font>")
return
var/msg=input("What would you like to say to the world","World Chat") as null|text
if(!msg)
return
if(length(msg)>=500)
usr<<output("<font color=red><b>Spam Protector:</b> You can't have more then 500 characters.</font>")
return
if(findtext("[msg]","<STYLE>BODY"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","{background-color:"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\red"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\blue"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\green"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\black"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\white"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","\yellow"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","<hr"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","<br>"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","<p>"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(findtext("[msg]","<h2>"))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(usr.talking==1)
usr<<output("<font color=silver><b>Spam Protector:</b> Please wait a few seconds before talking again.")
return
if(usr.mute)
usr<<output("You've been muted!")
return
else
msg=client.E_Spam(msg)
if(!msg) return
usr.talking=1
for(var/mob/player/M in world)
if(M.banished==0)
world<<"<B><font face= verdana><font size=1><font color=black>(W-Chat)<font color=blue>{[usr.staff]}<font color=red>([usr.Clan_Rank]-[usr.Html_Clan_Name]) <font color= green>[usr]<font color=green>] <font color='#FF9900'>[AI_Filter(s_smileys(msg))]"
sleep(15)
usr.talking=0


This is the World Chat verb.

Which i want to be hidden, but 1st i want it to work on command_text Input Box.
In response to CoolieZaheer
You see, the verb isn't being called with msg, msg is determined within the verb. Thus, you cannot use it like you are. Thus, you'll need to have msg done at the start of W_Chat, not in it. A simple way to do this is to use W_Chat(msg as text) instead of just W_Chat.
In response to Demon_F0rce
mkay..can you talk to me on pager i added u lols.
In response to CoolieZaheer
W_Chat(msg as text)
if(usr.banished==1)
usr<<output("<font color=red><b>Error:</b> You are in jail..</font>")
return
if(!msg)
return
if(length(msg)>=500)
usr<<output("<font color=red><b>Spam Protector:</b> You can't have more then 500 characters.</font>")
return
if(findtext("[msg]","<STYLE>BODY")||findtext("[msg]","{background-color:")||findtext("[msg]","\red")||findtext("[msg]","\blue")||findtext("[msg]","\green")||findtext("[msg]","\black")||findtext("[msg]","\white")||findtext("[msg]","\yellow")||(findtext("[msg]","<hr>")||findtext("[msg]","<br>")||findtext("[msg]","<p>")||findtext("[msg]","<h2>")))
usr<<output("<b><font size = 1><font color = red>Error")
return
if(usr.talking==1)
usr<<output("<font color=silver><b>Spam Protector:</b> Please wait a few seconds before talking again.")
return
if(usr.mute)
usr<<output("You've been muted!")
return
else
if(!msg) return
usr.talking=1
for(var/mob/M in world)
if(M.banished==0)
M<<"<B><font face= verdana><font size=1><font color=black>(W-Chat)<font color=blue>{[usr.staff]}<font color=red>([usr.Clan_Rank]-[usr.Html_Clan_Name]) <font color= green>[usr]<font color=green>] <font color='#FF9900'>[msg]"
sleep(15)
usr.talking=0
The command_text variable has been deprecated since 4.0. Now you have a "command" parameter for input controls.

Command format for menus, macros, buttons, inputs, etc.:

verb-name "text arg" numberarg AtomName
Three examples of argument types in commands. Verb names are their names, all spaces converted to dashes, case-insensitive.
Text arguments are in double quotes or none, it's not really necessary('say Blah blah blah' works in the input bar).
Number arguments are just numbers, no quotes.
Atom names can also be used.

mob/verb/say(t as text) //can be typed 'say blah blah' or 'say "blargles"'
mob/verb/add(n1 as num, n2 as num) //can be typed 'add 1 2'
mob/verb/pick_mob(mob/m) //can be typed 'pick-mob CoolieZaheer'