error 017: undefined symbol "str"
#1

Код:
C:\Users\Matt\Desktop\SA-MP Files\ETS\gamemodes\ets.pwn(6587) : error 017: undefined symbol "str"
C:\Users\Matt\Desktop\SA-MP Files\ETS\gamemodes\ets.pwn(6587) : error 017: undefined symbol "str"
C:\Users\Matt\Desktop\SA-MP Files\ETS\gamemodes\ets.pwn(6587) : error 029: invalid expression, assumed zero
C:\Users\Matt\Desktop\SA-MP Files\ETS\gamemodes\ets.pwn(6587) : fatal error 107: too many error messages on one line

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


4 Errors.
PHP код:
CMD:back(playerid,params[])
{
  if(
AFK[playerid] == 0)
  {
        
SendClientMessage(playeridred"You are not in AFK to use this command.");
  }
  else
  {
  
SpawnPlayer(playerid);
  new 
str[192];
  new 
Bname[MAX_PLAYER_NAME];
  
GetPlayerName(playerid,Bname,sizeof(Bname));
  
SetPlayerPos(playerid,xpos,ypos,zpos);
  
SetPlayerInterior(playerid,ainterior);
  
SetPlayerHealth(playerid,hp[playerid]);
  
SetPlayerArmour(playerid,armour[playerid]);
  
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  
Delete3DTextLabel(tAFK[playerid]);
  
format(strsizeof(str), "%s is now back from {FF0000} AFK"Bname);
  
SendClientMessageToAll(green,str);
  
AFK[playerid]=0;
  
TextDrawHideForPlayer(playeridTextdraw3);
  
TextDrawHideForPlayer(playeridTextdraw4);
  
TextDrawHideForPlayer(playeridTextdraw5);
  
format(strsizeof(str),"Welcome Back To Euro Truck Simulator!");
  
SendClientMessage(playeridorangestr);
  
AFKcount--;
  }
  
format(strsizeof(str), "[INFO]: %s has used /back",GetPName(playerid));
  
SendAdminMessage(green2,str);
  return 
1;

Reply
#2

pawn Код:
CMD:back(playerid,params[])
{
  new str[192];
  if(AFK[playerid] == 0)
  {
        SendClientMessage(playerid, red, "You are not in AFK to use this command.");
  }
  else
  {
  SpawnPlayer(playerid);
  new Bname[MAX_PLAYER_NAME];
  GetPlayerName(playerid,Bname,sizeof(Bname));
  SetPlayerPos(playerid,xpos,ypos,zpos);
  SetPlayerInterior(playerid,ainterior);
  SetPlayerHealth(playerid,hp[playerid]);
  SetPlayerArmour(playerid,armour[playerid]);
  PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  Delete3DTextLabel(tAFK[playerid]);
  format(str, sizeof(str), "%s is now back from {FF0000} AFK", Bname);
  SendClientMessageToAll(green,str);
  AFK[playerid]=0;
  TextDrawHideForPlayer(playerid, Textdraw3);
  TextDrawHideForPlayer(playerid, Textdraw4);
  TextDrawHideForPlayer(playerid, Textdraw5);
  format(str, sizeof(str),"Welcome Back To Euro Truck Simulator!");
  SendClientMessage(playerid, orange, str);
  AFKcount--;
  }
  format(str, sizeof(str), "[INFO]: %s has used /back",GetPName(playerid));
  SendAdminMessage(green2,str);
  return 1;
}
You created the string inside of the else but are trying to use it outside of the else.
Reply
#3

thanks men


EDIT:
PHP код:
warning 225unreachable code 
PHP код:
CMD:tune(playerid,params[])
{
    new 
str[208];
    {
        if(
PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,error);
        if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1""lyellow2"[INFO]: You must be "lred"inside "lwhite"the car to use this "lred"command.");
        
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        return 
SendClientMessage(playerid,green2,"[INFO]: You're car has been Tuned");
        
format(strsizeof(str), "[INFO]: %s has used /tune",GetPName(playerid));
          
SendAdminMessage(green2,str);
        return 
1;
     }

Reply
#4

....
Reply
#5

pawn Код:
CMD:tune(playerid,params[])
{
        new str[64];
        if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,error);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, ""lyellow2"[INFO]: You must be "lred"inside "lwhite"the car to use this "lred"command.");
        TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid,green2,"[INFO]: Your car has been Tuned");
        format(str, sizeof(str), "[INFO]: %s has used /tune",GetPName(playerid));
        SendAdminMessage(green2,str);
        return 1;
}
Why have a 208 celled string for "[INFO]: %s has used /tune"?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)