Givecash command problem
#1

ok i am using zcmd,

Here is Command

Код:
CMD:agivecash(playerid, params[]) {

        if(playerVariables[playerid][pAdminLevel] >= 4) {

	new id,name[24],amount,str[130];
	if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]";
	GetPlayerName(id,name,24);
	format(str,130,"You Given %s (%d) $%d!",name,id,amount);
	SendClientMessage(playerid,COLOR_RED,str);
	format(str,130,"Admin Given You $%d",amount);
	SendClientMessage(id,COLOR_RED,str);
	GivePlayerMoney(id,amount);
	
}else return SendClientMessage(playerid,red,"You Are Not An Admin, You Cant Use This Command");

		return 1;
}
And Here Are Errors

Код:
C:\Documents and Settings\Matej & Mario\Desktop\Nova mapa (2)\Windows\gamemodes\vx-rp.pwn(7993) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Matej & Mario\Desktop\Nova mapa (2)\Windows\gamemodes\vx-rp.pwn(8001) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help?
Reply
#2

pawn Код:
if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]");
Reply
#3

You are missing a ) on this line:
pawn Код:
if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]";
Also, loose indention means the vertical lining (indention) of the code is off.
Reply
#4

Thanks, it work now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)