Jump to content

[REZOLVAT] Problema Run time error 4


Flow
 Share

Recommended Posts

Username: Flow
Problema întălnită:  Run time error 4: "Array index out of bounds"
Detalii despre problemă: observ ca e de la oplayerdeath
Ce ai încercat să faci înainte să postezi?: nimic
Cod sursă (recomandat pastebin.com) : public onplayerdeath https://pastebin.com/tEHz2rfP
Alte detalii: eroare : https://pastebin.com/nwWLM1aS

#define noob_level[MAX_PLAYERS];

function IHaveTheNoob(playerid){
	new randomlevelnoob = 0 + random(2);
	noob_level[playerid] = randomlevelnoob;
	switch(noob_level[playerid]){
		case 0: SendClientMessage(playerid, -1, "You f**king noob men, this is Babur's opinion");
		case 1: SendClientMessage(playerid, -1, "Brother, you are noob, nothing has changed");
		default: SendClientMessage(playerid, -1, "HA HA HA, YOU NOOB IN PAWN! HA HA HA!");
	}	
	Kick(playerid);
	return 1;
}
OnPlayerConnect return IHaveTheNoob(playerid);

 

cooltext370126435149439.png

Link to comment
Share on other sites

  • Administrator
[11:48:07] [debug] Run time error 4: "Array index out of bounds"
[11:48:07] [debug]  Accessing element at index 65535 past array upper bound 999

 

Accesezi un array cu un numar prea mare decat cel stabilit.. e cam greu sa-ti dai seama unde-i problema din cauza public-ului atat de mare si incarcat...

Link to comment
Share on other sites

Acum 51 minute, Leonard a spus:

[11:48:07] [debug] Run time error 4: "Array index out of bounds"
[11:48:07] [debug]  Accessing element at index 65535 past array upper bound 999

 

Accesezi un array cu un numar prea mare decat cel stabilit.. e cam greu sa-ti dai seama unde-i problema din cauza public-ului atat de mare si incarcat...

Am rezolvat, multumesc!

#define noob_level[MAX_PLAYERS];

function IHaveTheNoob(playerid){
	new randomlevelnoob = 0 + random(2);
	noob_level[playerid] = randomlevelnoob;
	switch(noob_level[playerid]){
		case 0: SendClientMessage(playerid, -1, "You f**king noob men, this is Babur's opinion");
		case 1: SendClientMessage(playerid, -1, "Brother, you are noob, nothing has changed");
		default: SendClientMessage(playerid, -1, "HA HA HA, YOU NOOB IN PAWN! HA HA HA!");
	}	
	Kick(playerid);
	return 1;
}
OnPlayerConnect return IHaveTheNoob(playerid);

 

cooltext370126435149439.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...