compiler error
#1

how to add this code
COMMAND:agiveweapon(playerid, params[])
{
if(!logged[playerid])
return SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in!");

if(PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not allowed to use that command!");

new
targetid = INVALID_PLAYER_ID,
weaponid,
ammo;

if(sscanf(params, "uii", targetid, weaponid ammo))
return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /agiveweapon [id] [arme] [munitions]");

if(!IsPlayerConnected(targetid))
{
format(string, sizeof(string), "ID:%d is not an active player.", targetid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}

new
targetName[MAX_PLAYER_NAME],
weaponName[32];

GetPlayerName(targetid, targetName, sizeof targetName);
GetWeaponName(weaponid, weaponName, sizeof weaponName);

GivePlayerWeapon(targetid, weaponid, ammo);

format(string, sizeof(string), "You have given %s a %d with %d ammo.", targetName, weaponName, ammo);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}

i compile it and i get error like this

C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 017: undefined symbol "logged"
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : warning 215: expression has no effect
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 001: expected token: ";", but found "]"
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 029: invalid expression, assumed zero
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : fatal error 107: too many error messages on one line

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


4 Errors.

or how to short this code to zcmd code
crukk11 is online now Add to crukk11's Reputation Report Post
crukk11 is online now Add to crukk11's Reputation Report Post
Reply


Messages In This Thread
compiler error - by crukk11 - 12.02.2017, 06:24
Re: compiler error - by SyS - 12.02.2017, 06:36
Re: compiler error - by crukk11 - 12.02.2017, 08:07
Re: compiler error - by crukk11 - 12.02.2017, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)