whats wrong with this arguments? - 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: whats wrong with this arguments? (
/showthread.php?tid=441006)
whats wrong with this arguments? -
drichie - 01.06.2013
Код:
CMD:givemoney(playerid, params[])
{
new playerb, amount;
if(sscanf(params,"ui",playerb,amount)) return SendClientMessage(playerid,lblue, "USAGE: /givemoney [playerid][amount]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,grey, "Invalid player id.");
GiveDrichMoney(playerb,amount);
return 1;
}
if(sscanf(params,"ui",playerb,amount)) return SendClientMessage(playerid,lblue, "USAGE: /givemoney [playerid][amount]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,grey, "Invalid player id.");
this line where i get this error
Код:
test1.pwn(140) : error 035: argument type mismatch (argument 2)
test1.pwn(141) : error 035: argument type mismatch (argument 2)
Re: whats wrong with this arguments? -
_chimera_ - 01.06.2013
replace to:
replace to:
pawn Код:
CMD:givecash(playerid,params[])
{
new IDMoney;
new str[128];
if(sscanf(params, "d", IDMoney)== 0)
{
if(IsPlayerConnected(IDMoney))
{
SendClientMessage(playerid, COLOR_RED,"bla bla bla bla");
for(new i = 0; i < MAX_PLAYERS; i++)
{
GivePlayerMoney(i, IDMoney);
}
}
else return SendClientMessage(playerid, COLOR_RED,"*** player not connected");
}
else return SendClientMessage(playerid, COLOR_RED,"*** command invalid!");
return 1;
}
Re: whats wrong with this arguments? -
YesYesYes - 01.06.2013
could be a problem in your color define
Re: whats wrong with this arguments? -
drichie - 01.06.2013
o yeah the color define +rep tnx btw what is the right way in defining colors? coz i use this one just copied it in this forum
#define white "{FFFFFF}"
#define red "{F81414}"
#define green "{00FF22}"
Re: whats wrong with this arguments? -
_chimera_ - 01.06.2013
if error color define result:
Код:
error 017: undefined symbol "grey"
Re: whats wrong with this arguments? -
Stanford - 01.06.2013
pawn Код:
#define COLOR_GREY 0xAFAFAFFF