SA-MP Forums Archive
Help me please with that errors .. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me please with that errors .. (/showthread.php?tid=79062)



Help me please with that errors .. - hanan2 - 25.05.2009

Код:
C:\Documents and Settings\зрп ойоеп\щемзп дтбегд\зрп\samp\gamemodes\gf.pwn(26247) : error 032: array index out of bounds (variable "JoinPed")
C:\Documents and Settings\зрп ойоеп\щемзп дтбегд\зрп\samp\gamemodes\gf.pwn(26247) : error 032: array index out of bounds (variable "JoinPed")

Thats the lines of the erorrs

Код:
				case 15: //FireMan
				{
				  if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[62][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[62][0]; }
				  else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[63][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[63][0]; }
				  else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[64][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[64][0]; }
				}



Re: Help me please with that errors .. - member - 25.05.2009

what is the size of the "JoinPed" array?

EDIT: refer to here. Same problem as you. http://forum.sa-mp.com/index.php?top...0941#msg580941
Search next time.


Re: Help me please with that errors .. - MenaceX^ - 25.05.2009

hanan2, this forum has its rules, you could've read forum rules so you could've know that you SHOULD NOT post what ever is related to the GF script in scripting discussion - You should've done it in Godfather gamemode thread.


Re: Help me please with that errors .. - hanan2 - 25.05.2009

But looks .. The joinped size its ok ..


Код:
new JoinPed[64][1] = {
{280},//POLICE_FORCE
{281},
{282},
{283},
{284},
{285},
{288},
{71},
{166},
{295},
{148},
{286},//FBI/ATF
{164},
{163},
{287},//NATIONAL_GUARD
{285},
{70},//AMBULANCE
{274},
{275},
{276},
{258},//LA_COSA_NOSTRA
{127},
{126},
{125},
{124},
{113},
{111},
{98},
{120},//YAKUZA
{121},
{122},
{123},
{169},
{186},
{228},
{127},//HITMANS
{165},
{186},
{93},
{141},
{148},//NEWS_REPORTERS
{188},
{187},
{255},//TAXI_CAB_COMPANY
{253},
{59},//DRIVING/FLYING_SCHOOL
{60},//DRIVING/FLYING_SCHOOL
{76},//DRIVING/FLYING_SCHOOL
{150},//DRIVING/FLYING_SCHOOL
{0},//GROVE
{105},
{106},
{107},
{269},
{271},
{115},//Aztecas
{114},
{116},
{102},//Ballas
{103},
{104},
{277},//FireMan
{278},
{279}
};



Re: Help me please with that errors .. - member - 25.05.2009

Didn't you read the link i gave u?
Quote:
Originally Posted by 0rb
Just leave the size blank, and also, why a second dimension of size 1 totally useless lol

pawn Код:
new JoinPed[] =
{
  59,
  60,
  76,
  150
};



Re: Help me please with that errors .. - hanan2 - 25.05.2009

I Did it and its doesnt work !!!
Hellllp


Re: Help me please with that errors .. - MenaceX^ - 25.05.2009

Read again my reply, moderators ban for breaking forum rules.


Re: Help me please with that errors .. - member - 25.05.2009

i am not too good with arrays. Try this:

pawn Код:
new JoinPed[65][1] = {
or:
pawn Код:
new JoinPed[66][1] = {



Re: Help me please with that errors .. - hanan2 - 25.05.2009

MenaceX^
Im sorry .. Give him just to help me now and thats it Im will not do it again ..

Look .. : Thats the error now !!1

C:\Documents and Settings\зрп ойоеп\щемзп дтбегд\зрп\samp\gamemodes\gf.pwn(26425) : error 032: array index out of bounds (variable "JoinPed")
C:\Documents and Settings\зрп ойоеп\щемзп дтбегд\зрп\samp\gamemodes\gf.pwn(26425) : error 032: array index out of bounds (variable "JoinPed")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



And thats the Lines

Код:
				case 15: //FireMan
				{
				  if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[62][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[62][0]; }
				  else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[63][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[63][0]; }
				  else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[64][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[64][0]; }
				}
Please help and thanks you


Re: Help me please with that errors .. - Think - 25.05.2009

gosh, remove the [0] after joinped.