28.03.2011, 04:27
hey When i convert Dcmd To Zcmd it gives me these errors
Here are The Errors
pawn Код:
CMD:vslap(playerid,params[])
{
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(GetPVarInt(playerid, "vip") < 1) return SendClientMessage(playerid, 0xFF0000FF, "Your not a Diamon vip(Level 3).");
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /slap [playerid] [reason/with]");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"SLAP");
new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health); SetPlayerHealth(player1,Health-25);
GetPlayerPos(player1,x,y,z); SetPlayerPos(player1,x,y,z+5); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);
if(strlen(tmp2)) {
format(string,sizeof(string),"You have been slapped by Vip %s %s ",adminname,params[2]); SendClientMessage(player1,red,string);
format(string,sizeof(string),"You have slapped %s %s ",playername,params[2]); return SendClientMessage(playerid,blue,string);
} else {
format(string,sizeof(string),"You have been slapped by Vip %s ",adminname); SendClientMessage(player1,red,string);
format(string,sizeof(string),"You have slapped %s",playername); return SendClientMessage(playerid,blue,string); }
} else return SendClientMessage(playerid, red, "Player is not connected or is the highest level admin");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\TDM.pwn(684) : error 017: undefined symbol "PlayerInfo"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\TDM.pwn(684) : warning 215: expression has no effect
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\TDM.pwn(684) : error 001: expected token: ";", but found "]"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\TDM.pwn(684) : error 029: invalid expression, assumed zero
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\TDM.pwn(684) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.