SA-MP Forums Archive
Help :3 - 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: Help :3 (/showthread.php?tid=502471)



Help :3 - ChandraLouis - 24.03.2014

Error :
Код:
(841) : error 029: invalid expression, assumed zero
(841) : warning 215: expression has no effect
Here Line 841:
pawn Код:
PlayerInfo[ID][pReps] = +1;
Full Code :
pawn Код:
CMD:rep(playerid,params[])
{
    static ID, name[MAX_PLAYERS], string7[200], name2[MAX_PLAYERS], string8[200];
    if (sscanf(params, "ii", ID)) return SendClientMessage(playerid, 0xff0000aa, "[Rep-System]: /rep [playerid/name]");
    if (playerid == ID) return SendClientMessage(playerid, 0xff0000aa, "[Rep-System]: You can't rep yourself!");

    GetPlayerName(ID, name2, sizeof(name2));
    format(string8,sizeof(string8),"[Rep-System]: {FFAF00}%s recieved has recieved rep!",name2);
    SendClientMessageToAll(COLOR_RED,string8);

    GetPlayerName(playerid, name, sizeof(name));
    format(string7,sizeof(string7),"[Rep-System]: {FFFF00}* %s(%d) has repped you !",name,playerid);
    SendClientMessage(ID,COLOR_RED,string7);
    PlayerInfo[playerid][pReps] = -1;
    PlayerInfo[ID][pReps] = +1;
    return 1;
}



Re: Help :3 - Flake. - 24.03.2014

This what you meant?

pawn Код:
PlayerInfo[ID][pReps] ++;



Re: Help :3 - ]Rafaellos[ - 24.03.2014

Or
pawn Код:
PlayerInfo[ID][pReps] += 1;



Re: Help :3 - ChandraLouis - 24.03.2014

Thank you 2