SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/12/2019, 08:56 PM   #1
Jumberi
Big Clucker
 
Join Date: May 2014
Posts: 81
Reputation: 0
Default [debug] Run time error 4: "Array index out of bounds"

Code:
[2019/12/09 02:26:57] [debug] Run time error 4: "Array index out of bounds"
[2019/12/09 02:26:57] [debug]  Attempted to read/write array element at index 50 in array of size 50
[2019/12/09 02:26:57] [debug] AMX backtrace:
[2019/12/09 02:26:57] [debug] #0 007d8830 in public EntersExitsLoad () in gamemode.amx
HI GUYS.. I have problem with this so can any of u help me?

Code:
forward EntersExitsLoad();
public EntersExitsLoad()
{
	Iter_Clear(EnterExit);
	new rows = cache_num_rows();
	new string[256];
	for(new i = 0; i < rows; i++)
	{
		printf("i: %d", i);

		cache_get_value_name_int(i, "id", EntersExits[i][eeId]);
		cache_get_value_name_int(i, "EnterInt", EntersExits[i][eeEnterInt]);
		cache_get_value_name_int(i, "ExitInt", EntersExits[i][eeExitInt]);
		cache_get_value_name_int(i, "EnterVW", EntersExits[i][eeEnterVW]);
		cache_get_value_name_int(i, "ExitVW", EntersExits[i][eeExitVW]);
		cache_get_value_name(i, "Name", EntersExits[i][eeName], 32);
		cache_get_value_name_float(i, "EnterX", EntersExits[i][eeEnterX]);
		cache_get_value_name_float(i, "EnterY", EntersExits[i][eeEnterY]);
		cache_get_value_name_float(i, "EnterZ", EntersExits[i][eeEnterZ]);
		cache_get_value_name_float(i, "ExitX", EntersExits[i][eeExitX]);
		cache_get_value_name_float(i, "ExitY", EntersExits[i][eeExitY]);
		cache_get_value_name_float(i, "ExitZ", EntersExits[i][eeExitZ]);
		format(string, sizeof string, "\"%s\"\n{DBDBDB}Rašykite /enter", EntersExits[i][eeName]);
		EntersExits[i][eeEnterLabel] = CreateDynamic3DTextLabel(string, 0xFFAB00FF, EntersExits[i][eeEnterX], EntersExits[i][eeEnterY], EntersExits[i][eeEnterZ], 13.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, EntersExits[i][eeEnterVW], EntersExits[i][eeEnterInt]);
		EntersExits[i][eeExitLabel] = CreateDynamic3DTextLabel("Išėjimas\nRašykite /exit", 0x618B4CFF, EntersExits[i][eeExitX], EntersExits[i][eeExitY], EntersExits[i][eeExitZ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, EntersExits[i][eeExitVW], EntersExits[i][eeExitInt]);
		Iter_Add(EnterExit, i);
	}
	printf("[load] %d iejimu/isejimu", rows);
	return 1;
}
Jumberi is offline   Reply With Quote
Old 09/12/2019, 09:07 PM   #2
Jumberi
Big Clucker
 
Join Date: May 2014
Posts: 81
Reputation: 0
Default Re: [debug] Run time error 4: "Array index out of bounds"

fixed nvm
Jumberi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[debug] Run time error 4: "Array index out of bounds" problem MaestrulFritz Scripting Help 1 31/08/2019 11:14 AM
[12:02:57] [debug] Run time error 4: "Array index out of bounds" [12:02:57] [debug] Attempted to read/write array eleme sonn51280 Scripting Help 5 13/07/2019 01:08 PM
[debug] Run time error 4: "Array index out of bounds" Xleone Scripting Help 8 27/07/2017 12:02 PM
debug] Run time error 4: "Array index out of bounds" skiplovebra Scripting Help 5 13/04/2016 05:49 PM
[debug] Run time error 4: "Array index out of bounds" and many more errors :P ntmp Scripting Help 2 11/08/2014 02:10 PM


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.