Errors with /buyGrenades (Giving Credits!)
#1

This is my script
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmd, "/BuyGrenades", true) == 0)
	{
	new
	tmp[20],
	amount;
	tmp = strtok(cmdtext, index);
	if (strlen(tmp))
	{
	amount = strval(tmp);
	if (IsPlayerConnected(amount))
	{
	GivePlayerWeapon(playerid,16,amount");
	GivePlayerMoney(playerid,-amount*1000)
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "You Don't Have enough Money!");
	}
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/buygrenades <amount>\"");
	}
	return 1;
	}
	return 0;
}
These are my errors ...
Код:
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(102) : error 017: undefined symbol "cmd"
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(107) : error 017: undefined symbol "strtok"
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(107) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(113) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(113) : warning 215: expression has no effect
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(113) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(113) : error 029: invalid expression, assumed zero
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\GunDealerJob.pwn(113) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Help and i will add you in the Credits area for my FS i am working on.
Reply


Messages In This Thread
Errors with /buyGrenades (Giving Credits!) - by Sal_Kings - 07.08.2009, 21:37
Re: Errors with /buyGrenades (Giving Credits!) - by kingworldsoft - 07.08.2009, 22:18

Forum Jump:


Users browsing this thread: 1 Guest(s)