PDA

View Full Version : string error


jaskiller
01/01/2012, 02:44 PM
hi i have a probleme with enumeration string :

enum cInfo
{
model,
Float:xspawn,
Float:yspawn,
Float:zspawn,
Float:anglespawn,
col1,
col2,
respawn,
owner[MAX_PLAYER_NAME],
bool:tosell,
price
}
new CarInfo[MAX_VEHICLES][cInfo];



when i write


function (idofcar, .....)
{
CarInfo[idofcar][owner] = "roleplay_name";

}


I have error : error 032: array index out of bounds (variable "CarInfo")
and sorry for bad english

Dark_Kostas
01/01/2012, 02:49 PM
idofcar is probably wrong in your case. Make sure its something <= MAX_VEHICLES-1

jaskiller
01/01/2012, 03:01 PM
ok thx