Page 1 of 1
Selection Gumps
Posted: Fri Sep 18, 2009 2:06 am
by westrupp
Code: Select all
Program ClassePicker(who)
var options := PhoneticAlphabet();
var input := SelectionGump(who, "Choose your classe:", options, BTN_TYPE_CHECKBOX);
SendSysMessage(who, "Input->"+input);
SendSysMessage(who, input);
if (input == "Powerplayer")
TurnClasse(who , classe := "pp");
endif
EndProgram
function PhoneticAlphabet()
var options := array{
"Crafter",
"Druid",
"Mage",
"Ranger",
"Thief",
"Warrior",
"Powerplayer"
};
return options;
endfunction
I select Powerplayer, sendsysmsg say to me correct option but dont run my IF calling turnclasse function...anyone know why?
Thx,
Re: Selection Gumps
Posted: Fri Sep 18, 2009 1:24 pm
by *Edwards
What is the input reference when using SendSysMsg? if it's "Powerplayer" there should be no problems. Maybe try CStr( input ) == "Powerplayer"
And maybe it's your turnclass() nt correct.
Re: Selection Gumps
Posted: Fri Sep 18, 2009 4:04 pm
by Tomi
try this
Print( TypeOf( input ) );
and see what it gives you, if its something else than "String" then the problem is there.