Attempted to read/write array element at negative index -400
#7

Quote:
Originally Posted by jlalt
Посмотреть сообщение
Simply add a check before doing the 3dtext label update process.
PHP код:
if(GetVehicleModel(playerVehicle[i]) > 0)
{
    new 
Float:health;
    
GetVehicleHealth(GetPlayerVehicleID(i), health);
    new 
Float:percentage = (health 250) / 750 100;
    
/* Line 1882 */ format(msc,sizeof msc,"\n\n%s\nAlive: %d seconds | Speed: %d MPH\nHealth: %d%%\nPosition: %d%s",VehicleNames[GetVehicleModel(playerVehicle[i])-400],playerTime[i],final_speed,floatround(percentagefloatround_ceil),GetPlayerPlace(i), GetSuffix(GetPlayerPlace(i)));
    
UpdateDynamic3DTextLabelText(SumoCar[i], 0x00ff00bb,msc);

It worked! +rep
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)