- script testcharname#Testserver FAKE_NPC,{
OnInit:
bindatcmd("testingname","testcharname#Testserver::OnTestName",99);
OnTestName:
mes "GO";
input .@name$;
next;
query_sql "SELECT charid,name FROM `char` WHERE `name` = "+.@name$,.@charid,.@gname$;
if(.@gname$ == .@name$){
mes "Hey";
dispbottom ("["+.@charid+"]",0x00FA9A);
close;
} else {
mes "Hoy";
dispbottom ("Character doesn't exist.",0x00FA9A);
close;
}
}
I need to get results if the input is valid, if not will display "character doesn't exist". Got no errors on script checker but script doesn't proceed. I think there's something wrong with my query and I'm not getting results
Hi All,
I need help with a quick SQL query script.
- script testcharname#Testserver FAKE_NPC,{ OnInit: bindatcmd("testingname","testcharname#Testserver::OnTestName",99); OnTestName: mes "GO"; input .@name$; next; query_sql "SELECT charid,name FROM `char` WHERE `name` = "+.@name$,.@charid,.@gname$; if(.@gname$ == .@name$){ mes "Hey"; dispbottom ("["+.@charid+"]",0x00FA9A); close; } else { mes "Hoy"; dispbottom ("Character doesn't exist.",0x00FA9A); close; } }
I need to get results if the input is valid, if not will display "character doesn't exist". Got no errors on script checker but script doesn't proceed. I think there's something wrong with my query and I'm not getting results
Share this post
Link to post
Share on other sites