some errors..
#1

gold-rpg.pwn(757) : error 028: invalid subscript (not an array or too many subscripts): "Fuell"
gold-rpg.pwn(757) : error 001: expected token: ";", but found "]"
gold-rpg.pwn(757) : error 029: invalid expression, assumed zero

The line:

PHP код:
[COLOR="Red"]if(Fuell[GetPlayerVehicleID(playerid)] <= 30)[/COLOR]
{
       
vehs "~r~";

Reply
#2

Can you show us your Fuell declaration, like "new Fuell..."?
Reply
#3

PHP код:
public UpdateSpeedometr(playerid)
{
      if(
GetPlayerState(playerid) == 2)
      {
        new 
locked[32];
        new 
str[64],str2[64],str3[64];
        new 
str4[64];
        new 
str5[64], str6[64];
        new 
Float:vehhelvehh[20], vehs[20], vehe[20], veher[20];
          if(
IsLocked[GetPlayerVehicleID(playerid)] == truelocked "~r~LOCK";
          else 
locked "~g~UNLOCK";
          
GetVehicleHealth(GetPlayerVehicleID(playerid), vehhel);
          if(
vehhel <= 500vehh "~r~";
          else 
vehh " ";
          if(
Fuell[GetPlayerVehicleID(playerid)] <= 30)
          {
             
vehs "~r~";
        }
          else 
vehs "";
          if(
zavodis[playerid] == truevehe "~g~ON";
          else 
vehe "~r~OFF";
          
format(strsizeof(str),"%d KM/H",SpeedVehicle(playerid) / 2);
          if(
vehhel <= 300format(str3sizeof(str3),"%s30%",vehh); else format(str3sizeof(str3),"%s%.0f%",vehh,vehhel 10);
              
format(str2sizeof(str2), "%s"locked);
          
format(str4sizeof(str4), "%s%.0f"vehs,Fuell[GetPlayerVehicleID(playerid)]);
          
format(str5sizeof(str5), "%s"vehe);
          
format(str6sizeof(str6), "%s"veher);
          
TextDrawSetString(FuelShow[playerid],str4);
          
TextDrawSetString(HealthShow[playerid],str3);
          
TextDrawSetString(SpeedShow[playerid],str);
          
TextDrawSetString(StatusShow[playerid],str2);
          
TextDrawSetString(Speed2Show[playerid],str6);
          
TextDrawSetString(EngineShow[playerid],str5);
          
UnSurfCar(GetPlayerVehicleID(playerid));
      }
    return 
0;

Reply
#4

You could do like this , simple:
pawn Код:
new veh = GetPlayerVehicleID(playerid);
if(Fuell(veh) <=30)
and correct definition for Fuell variable is new Fuell[MAX_VEHICLES];
isn't it?
Reply
#5

yeah..thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)