Vehicles Respawn/Crashes Question
#5

Quote:
Originally Posted by SilentHuntR
Having over 700 vehicles and over 128 vehicle types causes crashes.

Add this command to find out how many vehicles/types your server has

pawn Код:
if(strcmp(cmdtext,"/checkvehicles",true)==0)
{
  new tmp,tmp2[212];
  for(new i; i<MAX_VEHICLES;i++)
  {
    if(GetVehicleModel(i))
    {
      tmp++;
      tmp[GetVehicleModel(i)]++;
    }
  }
  new tmp3;
  for(new i; i<212;i++)if(tmp2[i])tmp3++;
  format(tmp2,sizeof(tmp2),"%d vehicles -- %d vehicle types.",tmp,tmp3);
  return SendClientMessage(playerid,0xFF0000FF,tmp2);
}
Quote:

C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 028: invalid subscript (not an array or too many subscripts): "tmp"
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : fatal error 107: too many error messages on one line

Line 1023:
pawn Код:
tmp[GetVehicleModel(i)] ++;
Reply


Messages In This Thread
Vehicles Respawn/Crashes Question - by YamahaYZ - 27.04.2009, 12:21
Re: Vehicles Respawn/Crashes Question - by MenaceX^ - 27.04.2009, 12:46
Re: Vehicles Respawn/Crashes Question - by YamahaYZ - 27.04.2009, 13:54
Re: Vehicles Respawn/Crashes Question - by Joe Staff - 27.04.2009, 15:02
Re: Vehicles Respawn/Crashes Question - by Andom - 27.04.2009, 16:31
Re: Vehicles Respawn/Crashes Question - by Joe Staff - 27.04.2009, 16:50
Re: Vehicles Respawn/Crashes Question - by YamahaYZ - 27.04.2009, 17:38
Re: Vehicles Respawn/Crashes Question - by [eLg]Timmy - 27.04.2009, 17:52
Re: Vehicles Respawn/Crashes Question - by YamahaYZ - 28.04.2009, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)