I tried to make NPC to shows balance from SQL.. But each time I talk to that NPC, it keep shows 0 Points.. But my database have 7 points.. Tried almost 1 hour and keep googling around but still no luck.. Below is my sample script :
prontera,150,150,5 script Sample 861,{
mes " Hi";
if (select("Yes:No") - 1) close;
query_sql ("SELECT `balance` FROM `test` WHERE 'id' = 1", .BalancePoints);
mes "Your balance is "+(.BalancePoints)+"point .. ";
close;
}
Question
rakuzas
Hi,
I tried to make NPC to shows balance from SQL.. But each time I talk to that NPC, it keep shows 0 Points.. But my database have 7 points.. Tried almost 1 hour and keep googling around but still no luck.. Below is my sample script :
prontera,150,150,5 script Sample 861,{ mes " Hi"; if (select("Yes:No") - 1) close; query_sql ("SELECT `balance` FROM `test` WHERE 'id' = 1", .BalancePoints); mes "Your balance is "+(.BalancePoints)+"point .. "; close; }
Below is my table :
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.