SA-MP Forums Archive
warning 215: expression has no effect - 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: warning 215: expression has no effect (/showthread.php?tid=443078)



warning 215: expression has no effect - xFirex - 10.06.2013

hmm here the code

pawn Код:
CMD:needrank(playerid,params[])
{
#pragma unused params
GivePlayerRankScore(playerid,20);//after i remove this, i didn't get any error
return 1;
}

stock GivePlayerRankScore(playerid,amount)
{
PlayerInfo[playerid][pRankScore] +amount;//error line
}
gelp pls


Re: warning 215: expression has no effect - dannyk0ed - 10.06.2013

pawn Код:
[PlayerInfo[playerid][pRankScore] = amount;
Try that.


AW: warning 215: expression has no effect - HurtLocker - 10.06.2013

PlayerInfo[playerid][pRankScore] = PlayerInfo[playerid][pRankScore]+amount;


Re: warning 215: expression has no effect - xFirex - 10.06.2013

with one ?


Re: warning 215: expression has no effect - jakejohnsonusa - 10.06.2013

Try adding the stock above the CMD (if it's like that in your gamemode), also what is the #pragma unused params for?


Respuesta: warning 215: expression has no effect - Parka - 10.06.2013

pawn Код:
stock GivePlayerRankScore(playerid,amount)
{
    PlayerInfo[playerid][pRankScore] += amount;
}



Re: warning 215: expression has no effect - xFirex - 10.06.2013

Quote:
Originally Posted by dannyk0ed
Посмотреть сообщение
pawn Код:
[PlayerInfo[playerid][pRankScore] = amount;
Try that.
this is SetPlayerRankScore not GivePlayerRankScore anyway tnx to HurtLocker


Re: warning 215: expression has no effect - xFirex - 10.06.2013

help, why i used

stock GivePlayerRankScore(playerid,amount)
{
PlayerInfo[playerid][pRankScore] = PlayerInfo[playerid][pRankScore]+amount;
}

it SetPlayerRankScore not GivePlayerRankScore

help pls