SA-MP Forums Archive
2 Errors { FAST HELP PLEASE } - 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: 2 Errors { FAST HELP PLEASE } (/showthread.php?tid=621917)



2 Errors { FAST HELP PLEASE } - RedRex - 16.11.2016

PHP код:
error 021symbol already defined"GivePlayerMoney"
error 010invalid function or declaration 
The Code of Stock

Код:
stock GivePlayerMoney(playerid, money)
{
     ResetPlayerMoney(playerid);
     GivePlayerMoney(playerid, money);
     return 1;
}



Re: 2 Errors { FAST HELP PLEASE } - TwinkiDaBoss - 16.11.2016

There is already GivePlayerMoney added by SA:MP team... Use something else


pawn Код:
stock GivePlayerCash(playerid, money)
{
     ResetPlayerMoney(playerid);
     GivePlayerMoney(playerid, money);
     return 1;
}

ie:
https://sampwiki.blast.hk/wiki/Function:GivePlayerMoney


Re: 2 Errors { FAST HELP PLEASE } - Bolex_ - 16.11.2016

You used the same function twice! Delete one!


Re: 2 Errors { FAST HELP PLEASE } - RedRex - 16.11.2016

Thanks all worked


EDITED


Re: 2 Errors { FAST HELP PLEASE } - TwinkiDaBoss - 16.11.2016

Quote:
Originally Posted by RedRex
Посмотреть сообщение
Yes man , i already add OnPlayerDeath So many of GivePlayerMoney so ... ??
Hold CTRL and press H

In "Search For" type in GivePlayerMoney and in "Replace With" type in GivePlayerCash, click on "Ok" then "Yes to All" easy as that.