Hi! i always got DB Error - Data truncated for column `balance` at row 1
i dont know what to do, here's my script
mes "You have a total of "+#VOTEPOINTS+" Vote Points.";
mes "Would you like to convert it to credits?";
mes "^ff0000Note:^000000 1 Vote Points = 1 Credits.";
next;
switch(select("Let me think first.:Yes, let's continue.")){
case 1:
mes .npcName$;
mes "Come back if you already want to talk to me.";
close;
case 2:
if(#VOTEPOINTS < 1){
mes .npcName$;
mes "You don't have enough Vote Points to convert.";
close;
}
else {
mes .npcName$;
mes "Put your desired amount to be converted.";
}
input @vote,0,#VOTEPOINTS;
if( @vote < #VOTEPOINTS ){
next;
mes .npcName$;
mes "Not enough Vote Points.";
close;
}
else {
next;
mes .npcName$;
mes "Thank you! and come again.";
query_sql "UPDATE `cp_credits` SET `balance` = `balance` + @vote WHERE `account_id` = "+ getcharid(3) +" AND `balance` <> 0;";
set #VOTEPOINTS,#VOTEPOINTS-@vote;
close;
}
}
Question
Limestone
Hi! i always got DB Error - Data truncated for column `balance` at row 1
i dont know what to do, here's my script
Link to comment
Share on other sites
8 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.