I'm trying to use a sort of search engine in my game. I do not want to use the default one, but a simple one with a text box, go button, and quit button, but nothing seems to want to work.
if (interface == PARSER) {
if (button == 2) {
if (GetTextBoxText(7,0,input)) {
if (StrCaseComp(input, "llama")==0) {Display("YAY");}
else {Display("NAY");}}}
else if (button == 3)
NewRoom(2);
GUIOff(PARSER);
}}
can someone help me get ti to work?
Assuming that PARSER is GUI 7 and your textbox is object 0, and this code is in interface_click with all the other numbers etc. correct, it looks fine to me.
But then I haven't done much with GUIs myself...
QuoteAssuming that PARSER is GUI 7 and your textbox is object 0, and this code is in interface_click with all the other numbers etc. correct, it looks fine to me
Yes PARSER is GUI 7
Yes textbox is object0
Yes the code is in the GUI script section
No it doesn't work
I've also now tried
if (interface == 7) {
if (button == 2) {
GetTextBoxText(7,0,input);
ParseText(input);
if (Said("llama")) {
SetTextBoxText(7,0,"");
Display("YAY");}
}
else if (button == 3) {
NewRoom(2);
GUIOff(7);}
What, exactly, is it that won't work?
Does none of the buttons work or just not the search button?
Neither of the buttons work... I can type stuff in and press the buttons but nothing happens... nothing at all
Thats the GUI below... please help :P
http://www.magware.pwp.blueyonder.co.uk/helpme.zip
should be GUI 7 (PARSER)
Ok, I found your error.
You have a bracket too little just before if (interface == PARSER) and one too many in the end of the script.
Thanks... why does it always have to be such a simple mistake :@(
I'm now getting a problem...
"Error: Said: Supplied word is not in dictionary or is an ignored word
hmm..." - sorted