MySql errors
#1

Hello guys, i have a problem when i compile script i get this warnings and error:

modules/sockets.pwn(430) : error 035: argument type mismatch (argument 1)
modules/sockets.pwn(514) : warning 213: tag mismatch
modules/sockets.pwn(533) : warning 213: tag mismatch


Line in script:

430
format(string,sizeof(string),"SELECT * FROM `ns_clients` WHERE `Username` = '%s'",pName[PlayerID]); mysql_tquery(string,true,"NSUpdateQuery","i",Playe rID);

514
mysql_format(SQLConn,query,false,"","");

533
mysql_format(SQLConn,query,false,"","");
Reply
#2

Код:
modules/sockets.pwn(430) : error 035: argument type mismatch (argument 1)
Argument 1 is "string". You've maybe created a variable called string, but to format it, you need to define its lenght, example:
PHP код:
new string[128]; 
Now you can format the string.

mysql_format has several arguments:
PHP код:
// formatting an example string
mysql_format(databasestringsizeof(string), "INSERT INTO `databasename` (`kills`) VALUES ('%d')",playerInfo[playerid][Kills] ); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)