error 076: syntax error in the expression, or invalid function call - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 076: syntax error in the expression, or invalid function call (
/showthread.php?tid=578060)
error 076: syntax error in the expression, or invalid function call -
Jimmi - 16.06.2015
From that comes this error:
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27903) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
//========================================[CMD /SHOWSTAFFACTIVITY]============================================//
CMD:showstaffactivity(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new jucator;
if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /showstaffactivity [PlayerID/PartOfName]");
new str[255+1], players[MAX_PLAYER_NAME];
GetPlayerName(jucator, players, sizeof(players));
format(str, sizeof(str), "{FFFFFF}Activitatea lui %s", players);
ShowPlayerDialog(playerid, 9, DIALOG_STYLE_MSGBOX, str, "/opr\t0 ori\n/cpr\t0 ori\n /unfreeze\t0 ori\n/setint\t0 ori\n/setvw\t0 ori\n/mute\t0 ori\n/mutereport\t0 ori\n/cc\t0 ori\n/respawn\t0 ori\n/slap\t0 ori\n/spec\t0 ori\n/setjob\t0 ori\n/kick\t0 ori\n/ban\t0 ori\n/goto\t0 ori\n/jail\t0 ori","Close","");
new Query[96];
format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[playerid][pName]);
mysql_query(Query);
}
return 1;
}
Line 27903
Код:
format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[playerid][pName]);
Re: error 076: syntax error in the expression, or invalid function call -
mamorunl - 16.06.2015
%i is an integer if I recall correctly. You are specifying a playername, thus a string (%s)