ID:272369
 
How would i go about giving specific info to a verb via the skin? I thought, at first, I could just make a verb for each button in my options pane. ie .winset "command = Male". But besides being a poor way to program it, it turns out i have about 40 buttons. what would be a more efficient way of doing it without making one verb for each button? For example, I've noticed that you cant put any options into a verb.
Ex
mob/verb/Set(T as text)
if(T == "Male")
src.Gender = "Male"
.winset "command=Set(Male)" //Wont work. (which is actually obvious).

Any ideas?
Arguments CAN be used and supplied through buttons. This is command-related, which are kind of a different concept, and is the same as it was even before 4.0. Thing is, Dream Seeker commands aren't DM code. To know if a command is correct, pretty much just test it by putting it manually to the command line (input control) and seeing if it errors up or not. Commands and command-related stuff are all the same whether used manually, from macros, from buttons... etc.
There are 2 problems with your syntax of "Set(Male)". First, arguments are separated by use of spaces. No parentheses (or commas) are used. Also, Male, incidentally just like in DM, is an invalid symbol. To use text, you need to put it in double quotes. Using a word without quotes is an attempt to use an object (your command would use an object named Male if available, otherwise it'd error up). So your code, and command, should be:
client/verb //this kind of stuff doesn't really have a reason to be defined on mob.
Button(id)
set name = ".button" //causes it to be hidden as well as not shown in command expansion unless a dot is typed first
if(id) //check if an id was supplied
switch(id) //use switch to compare the same variable for many values rather than an if-elseif chain
if("mybutton1")
//do stuff
if("mybutton2")
//do something else
else //no valid string was supplied to the verb
src << "Error: Invalid button argument" //it'd be wise to generate an error in this case

Commands on buttons:
.button "mybutton1"
.button "mybutton2"
In response to Kaioken
It was just an example I made from the top of my head, but to the point..
Thanks, ill try that out instead.
But wow, thats am amazing concept, I would have never thought of it.