Help Please
#1

My Server Log Error
Код:
[16:27:52] [debug] Run time error 4: "Array index out of bounds"
[16:27:52] [debug]  Attempted to read/write array element at index 36 in array of size 36
[16:27:52] [debug] AMX backtrace:
[16:27:52] [debug] #0 000a9ec8 in public OnDialogResponse (playerid=0, dialogid=786, response=1, listitem=1, inputtext[]=@00159400 "Level 2") at C:\Users\Anurag\Desktop\Call of Duty - Asia at War\gamemodes\cod8aawv1.1.pwn:9253
[16:28:08] [debug] Run time error 4: "Array index out of bounds"
Error Line
Код:
format(CommandList2, sizeof(CommandList2), CommandList2, Commands2[i]);
Full Code
Код:
        	    case 1:
        	    {
	if(PlayerInfo[playerid][Level] >= 2)
	{
	if(PlayerInfo[playerid][Level] >= 2)
	{
	new CommandList2[4000] = "%s";
		new b;
		new Commands2[][] =	{
		" \n%s",
        "{00FF40} Admin Level 2 Commands\n{DADADA}%s",
		"/giveweapon\t:    For Giving Weapon.\n%s",
		"/setcolour\t:    For Changing/Setting Colour.\n%s",
		"/async\t:   For Respawning Player..\n%s",
		"/lockcar\t:   For Locking Car.\n%s",
		"/unlockcar\t: For Unlocking Car.\n%s",
		"/burn\t:  To Burn A Player.\n%s",
		"/spawn\t:  For Respawing \n%s",
		"/disarm\t: To Make A Player Without Weapon.\n%s",
		"/unban\t\t: For Unbaning A Player.\n%s",
		"/ban\t:   For Banning A Player.\n%s",
		"/level2\t: Shortcut For Checking Level 2 admin Cmds.\n%s",
		"/lcar\t: For Admin Car.\n%s",
		"/lbike\t:   For Admin Bike\n%s",
		"/lheli\t:   For Admin Helicopter.\n%s",
		"/lboat\t\t: For Admin Boat.\n%s",
		"/lplane\t\t: For Admin Plane.\n%s",
		"/highlight\t\t: For Highlighting A Player.\n%s",
		"/flip\t\t:   For Fliping Your Car.\n%s",
		"/goto\t\t:   To Goto A Player.\n%s",
		"/vgoto\t\t:  To Goto A Vehicle.\n%s",
		"/get\t\t:    To Get A Player To Your Location.\n%s",
		"/slap\t\t:   For Slaping A Player.\n%s",
		"/jailed\t\t: For Viewing Jailed Players.\n%s",
		"/frozen\t\t: For Viewing Frozen Players.\n%s",
		"/muted\t\t:  For Viewing Muted Players.\n%s",
		"/screen\t\t: For Giving Text On The Screen.\n%s",
		"/laston\t\t: To Check When U Were Last On The Server.\n%s",
		"/clearchat\t\t: For Cleaning Chat.\n%s",
		"/lmenu\t\t:     For Admin Menu.\n%s",
		"/ltele\t\t:   For Admin Teleports..\n%s",
		"/cm\t\t:  Shortcut To Admin Car List..\n%s",
		"/ltmenu\t\t: Car Tunning Menu.\n%s",
		"/lvehicle\t\t: Vehicles Menu.\n%s",
		"Level 2 Admin Can Use The Commands Of Level 1 Admin.\n%s"


		};

		b = sizeof(Commands);
		for(new i = 0; i<b; i++)
		{
			format(CommandList2, sizeof(CommandList2), CommandList2, Commands2[i]);
		}

	    format(CommandList2, sizeof(CommandList2), CommandList2, "");

  		ShowPlayerDialog(playerid,51, DIALOG_STYLE_MSGBOX, "{FFFF00}COD", CommandList2, "close", "");
		  }
		return 1;
	}
}
Reply
#2

Can you please explaine to us what is you`r problem, not just the server log error. !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)