Help me
#1

Hello, I have error in this callback, because i have error:
Quote:

[17:33:15] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Please help me


Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_REGISTER)
{
if(response)
{
//Slaptaћodћio ilgis
new Vardas[MAX_PLAYER_NAME], query[64], slaptazodis[32];
GetPlayerName(playerid, Vardas, sizeof(Vardas));
if(strlen(inputtext) >= 6)
{
mysql_escape_string(inputtext, slaptazodis, manomysql);
format(query, sizeof(query), "INSERT INTO `user` (`vardas`, `slaptazodis`) VALUES ('%s', '%s')", Vardas, inputtext);
mysql_function_query(manomysql, query, false, "", "");
SendClientMessage(playerid, LIME, "Sėkmingai uћsiregistravote serveryje! Gero ћaidimo");
}
else
{
SendClientMessage(playerid, MELYNA, "Slaptaћodis turi būti bent 6 simbolių ilgio!");
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registracija", "Praљome įvesti sugalvotą slaptaћodį!", "Registruotis", "Iљeiti");
}
}
else
{
Kick(playerid);
SendClientMessage(playerid, RAUDONA, "Atљaukėte registraciją!");
}
}
return 1;
}

Reply
#2

PHP код:
new Vardas[MAX_PLAYER_NAME], query[64], slaptazodis[32]; 
query[64] is too small. Increase its size.

Also
PHP код:
mysql_function_query(manomysqlqueryfalse""""); 
Which MySql version are you using?
Reply
#3

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
PHP код:
new Vardas[MAX_PLAYER_NAME], query[64], slaptazodis[32]; 
query[64] is too small. Increase its size.

Also
PHP код:
mysql_function_query(manomysqlqueryfalse""""); 
Which MySql version are you using?
I'm using r34
Reply
#4

THAANKS it work
Reply
#5

Anytime.
Anyways consider updating your code (backup it before doing that).
Reply
#6

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
Anytime.
Anyways consider updating your code (backup it before doing that).
Thanks, +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)