06.04.2016, 11:07
(
Последний раз редактировалось sheNdjze; 06.04.2016 в 11:12.
Причина: fixed
)
i don't know why i am getting this error, i am trying to make a top public enemy list, so i am doing when a player finishes to be PENo1 to get +1 in the sqlite database in playerpen like he join the server and start with 0 and when he finish to be PENo1 he get +1
FIXED: i frogot to leave [] from GetPlayerPens.... what a mistake
Код:
D:\Ionut\Other\gta\Scripting\PENLS\gamemodes\penls.pwn(6002) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
PHP код:
new CQuery[200];
format(CQuery, 200, "UPDATE `pens` SET `playerpen` = '%d' WHERE `playername` = '%s'", GetPlayerPens(gPublicEnemy) + 1, GetPlayerNameEx(gPublicEnemy)); // LINE WITH ERROR
db_query(Database, CQuery);
return 1;
}
GetPlayerPens(pens[])
{
new CQuery[100], playerpens[100];
format(CQuery, sizeof(CQuery), "SELECT `playerpen` FROM `pens` WHERE `playername` = '%s'", pens);
Result = db_query( Database, CQuery );
db_get_field_assoc( Result, "playerpen", playerpens, 30 );
db_free_result(Result);
return strval(playerpens);
}