Thank you for your helping hand, Aleos.
prontera,154,182,4 script SQLTest 90,{
query_sql "SELECT `prev_class` FROM `homunculus` WHERE `char_id` = "+getcharid(0)+" LIMIT 1", .@prev_class;
if (.@prev_class == gethominfo(1) ) {
mes .@prev_class+" "+gethominfo(1);
close;
}
else
{
mes .@prev_class;
mes gethominfo(1);
close;
}
}
Now everytime I talk to that npc it shows something like:
[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: variable name='.@prev_class' index=0
[Debug]: Function: mes
[Debug]: Source (NPC): SQLTest at prontera (154,182)
[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: number value=6009
[Debug]: Function: mes
[Debug]: Source (NPC): SQLTest at prontera (154,182)