What is my mistake? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is my mistake? (
/showthread.php?tid=136011)
What is my mistake? -
DeaD_MaN - 22.03.2010
Код:
C:\Documents and Settings\Admin\Рабочий стол\Adminka.pwn(1001) : error 017: undefined symbol "SetPlayerMoney"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
And here is my code
Код:
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
SetPlayerMoney(pID,cash);
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"You have set the money of %s to %d $",name,cash);
format(string2,sizeof(string2),"Admin %s has set your money to %d $",aname,cash);
SendClientMessage(playerid,COLOR_GREEN,string);
SendClientMessage(pID,COLOR_GREEN,string2);
return 1;
Re: What is my mistake? -
DeaD_MaN - 22.03.2010
Forgive me if I write badly, I do not know your language
Re: What is my mistake? -
Goobiiify - 22.03.2010
its GivePlayerMoney, not SetPlayerMoney.
Re: What is my mistake? -
Fabio11 - 22.03.2010
Add this to the top of your script
pawn Код:
stock SetPlayerMoney(playerid,amount)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, amount);
return 1;
}
Re: What is my mistake? -
Finn - 22.03.2010
Or this:
pawn Код:
#define SetPlayerMoney(%0,%1) \
GivePlayerMoney(%0, (%1 - GetPlayerMoney(%0)))
Edit: Edited.
Re: What is my mistake? -
DeaD_MaN - 22.03.2010
Quote:
Originally Posted by Finn
Or this:
pawn Код:
#define SetPlayerMoney(%0,%1) \ GivePlayerMoney(%0, (%1 - GetPlayerMoney(%0)))
Edit: Edited.
|
Thank brother

It worked
Re: What is my mistake? -
adsy - 22.03.2010
Quote:
Originally Posted by DeaD_MaN
Quote:
Originally Posted by Finn
Or this:
pawn Код:
#define SetPlayerMoney(%0,%1) \ GivePlayerMoney(%0, (%1 - GetPlayerMoney(%0)))
Edit: Edited.
|
Thank brother  It worked
|
can someone explain what the %0 and %1 mean and how it represents what it is representing? i mean i can read that %0 is playerid but i really dont understand how it determines that %0 means playerid.