SA-MP Forums Archive
Problem with ... - 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: Problem with ... (/showthread.php?tid=595961)



Problem with ... - Alpay0098 - 10.12.2015

Hi community,

Problems :
Код:
gamemodes\N-RP.pwn(20388) : error 029: invalid expression, assumed zero
gamemodes\N-RP.pwn(20388) : warning 215: expression has no effect
Codes :
Код:
public WFuelIncrease()
{
    WFuel[1][wsfuel] =+ 1000; // line 20388
    return 1;
}



Re: Problem with ... - CrazyChoco - 10.12.2015

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
Hi community,

Problems :
Код:
gamemodes\N-RP.pwn(20388) : error 029: invalid expression, assumed zero
gamemodes\N-RP.pwn(20388) : warning 215: expression has no effect
Codes :
Код:
public WFuelIncrease()
{
    WFuel[1][wsfuel] =+ 1000; // line 20388
    return 1;
}

WFuel[1][wsfuel] =+ 1000;

This line is pure nonsense.

It shall be:
Codes :
Код:
public WFuelIncrease(playerid)
{
    WFuel[playerid][wsfuel] =+ 1000; // line 20388
    return 1;
}
[/QUOTE]


Re: Problem with ... - Alpay0098 - 10.12.2015

It's not related to player, 1 is MAX_WFUEL (Max Whole Fuel), the fuel that comes from Fuel Company for whole server


Re: Problem with ... - ATGOggy - 10.12.2015

Try this:
pawn Код:
WFuel[1][wsfuel] += 1000;



Re: Problem with ... - PrO.GameR - 10.12.2015

There is no =+
it's +=


Re: Problem with ... - Alpay0098 - 10.12.2015

Yea It worked,
ATGOggy Rep'ed