#1

Код:
forward InitializePlayerObjects(playerid);
public InitializePlayerObjects(playerid)
{
	new Query[160];
PHP код:
line 688 
mysql_format(gConnectionhandle, Query, "SELECT * FROM `PlayerObjects` WHERE `Name` = '%s' LIMIT 10", pName(playerid)); mysql_function_query(gConnectionhandle, Query, true, "OnPlayerObjectsLoad", "d", playerid); }
Код:
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\lol.pwn(688) : error 035: argument type mismatch (argument 3)
Reply
#2

Replace
pawn Код:
mysql_format(gConnectionhandle, Query, "SELECT * FROM `PlayerObjects` WHERE `Name` = '%s' LIMIT 10",     pName(playerid));
with
pawn Код:
format(Query, 128, "SELECT * FROM `PlayerObjects` WHERE `Name` = '%s' LIMIT 10", pName(playerid));
Reply
#3

There is no reason to do that. In-fact, you should use the %e as long as you are using mysql_format(this escapes the string). You forgot the sizeof parameter.

pawn Код:
mysql_format(gConnectionhandle, Query, sizeof(Query) "SELECT * FROM `PlayerObjects` WHERE `Name` = '%e' LIMIT 10",     pName(playerid));
Reply
#4

There is. I guess format is faster than mysql_format, and there is no need to use %e for player name, because the name can't contain ' or ` characters.
Reply
#5

Thanks you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)