SA-MP Forums Archive
string error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: string error (/showthread.php?tid=307898)



string error - jaskiller - 01.01.2012

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

PHP код:
function (idofcar, .....)
{
 
CarInfo[idofcar][owner] = "roleplay_name";

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


Re: string error - Dark_Kostas - 01.01.2012

idofcar is probably wrong in your case. Make sure its something <= MAX_VEHICLES-1


Re : string error - jaskiller - 01.01.2012

ok thx