Problem with spawn
#1

Код:
public OnPlayerSpawn(playerid)
{
    new Query[500];
	if(pInfo[playerid][Uj] == 0)
	{
	SetPlayerPos(playerid,-124.2139,1231.2828,18.6814);
	SetPlayerFacingAngle(playerid,180.0000);
	GivePlayerMoney(playerid,500);
	format(Query, 500, "UPDATE `players` SET `Uj` = '1' WHERE `Uj` = '0' LIMIT 1"); //Format the query
	mysql_query(Query);//425<-------------------
	pInfo[playerid][Uj] = 1;
	}
	else
	{
	SetPlayerPos(playerid, pInfo[playerid][posX], pInfo[playerid][posZ], pInfo[playerid][posZ]);
	}
	return 1;
}
Код:
.pwn(425) : error 035: argument type mismatch (argument 1)
Thank you for help
Reply
#2

Whats the line 425?
Reply
#3

mysql_query(Query);//425<-------------------
Reply
#4

Help
Reply
#5

mysql_query(conhandle, query[])

conhandle : The connection handle this will be processed on.
query[] : The query you want to execute.

Example:

PHP код:
new Cache:result mysql_query(MySQL"SELECT `Id` FROM `Users`");
printf("There are %d players in the database."cache_num_rows());
cache_delete(result); 
Reply
#6

Changes the first parameter(conhandle) by the variable that identifies your connection to the mysql database

pawn Код:
mysql_query(conhandle, Query, false);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)