mysql "AND" crashed my server. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql "AND" crashed my server. (
/showthread.php?tid=602112)
MYSQL PROBLEM. -
iLuXing - 02.03.2016
fixed.
Re: mysql "AND" crashed my server. -
iLuXing - 02.03.2016
up..
Re: mysql "AND" crashed my server. -
Metharon - 02.03.2016
"@updatePlayerSkill"
Try change the unction you call ?
Re: mysql "AND" crashed my server. -
iLuXing - 02.03.2016
Код:
new mySQL = -1;
connectMysql() {
mysql_log(LOG_ERROR | LOG_WARNING, LOG_TYPE_HTML);
mySQL = mysql_connect("127.0.0.1", "root", "sampdata", "root");
return (mysql_errno() != 0) ? false :true;
}
main() {
connectMysql();
mysql_tquery(mySQL, "SELECT * FROM `skills` WHERE `id` ='0' and `skillid` = '0' LIMIT 1", "@updatePlayerSkill", "dddd", a, b, c, d);
}
forward @updatePlayerSkill(const a, const b, const c ,const d);
@updatePlayerSkill(const a, const b, const c ,const d) {
new e = a + b + c + d;
printf("e = %d", e);
}
I tested this code and run with no creash.
I think the problem is var or something...