What is my mistake?
#1

Код:
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;
Reply
#2

Forgive me if I write badly, I do not know your language
Reply
#3

its GivePlayerMoney, not SetPlayerMoney.
Reply
#4

Add this to the top of your script

pawn Код:
stock SetPlayerMoney(playerid,amount)
{
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, amount);
    return 1;
}
Reply
#5

Or this:
pawn Код:
#define SetPlayerMoney(%0,%1) \
  GivePlayerMoney(%0, (%1 - GetPlayerMoney(%0)))
Edit: Edited.
Reply
#6

Quote:
Originally Posted by Finn
Or this:
pawn Код:
#define SetPlayerMoney(%0,%1) \
  GivePlayerMoney(%0, (%1 - GetPlayerMoney(%0)))
Edit: Edited.
Thank brother It worked
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)