PDA

View Full Version : warning 215: expression has no effect


xFirex
10/06/2013, 01:07 PM
hmm here the code


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 :)

dannyk0ed
10/06/2013, 01:09 PM
[PlayerInfo[playerid][pRankScore] = amount;

Try that.

HurtLocker
10/06/2013, 01:09 PM
PlayerInfo[playerid][pRankScore] = PlayerInfo[playerid][pRankScore]+amount;

xFirex
10/06/2013, 01:11 PM
with one ?

jakejohnsonusa
10/06/2013, 01:11 PM
Try adding the stock above the CMD (if it's like that in your gamemode), also what is the #pragma unused params for?

Parka
10/06/2013, 01:11 PM
stock GivePlayerRankScore(playerid,amount)
{
PlayerInfo[playerid][pRankScore] += amount;
}

xFirex
10/06/2013, 01:13 PM
[PlayerInfo[playerid][pRankScore] = amount;

Try that.


this is SetPlayerRankScore not GivePlayerRankScore anyway tnx to HurtLocker

xFirex
10/06/2013, 01:16 PM
help, why i used

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

it SetPlayerRankScore not GivePlayerRankScore

help pls :cry: