F*cking Errors
#1

C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : error 032: array index out of bounds (variable "Carlist")
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : error 032: array index out of bounds (variable "Carlist")
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : error 032: array index out of bounds (variable "Carlist")
C:\Dokumente und Einstellungen\Administrator\Desktop\Ryan\homeserve r\gamemodes\4.pwn(2483) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
So, there should be the wrong place: :/

Код:
 new plname[MAX_PLAYER_NAME];
new string[MAX_PLAYER_NAME];
(Errorline:)new dateiname[MAX_PLAYER_NAME+4];
Carlist[playerid][Typ]=-1; Carlist[playerid][ahX]=0.0; Carlist[playerid][ahY]=0.0; Carlist[playerid][ahZ]=0.0;
Carlist[playerid][ahRotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Farbe1]=-1; Carlist[playerid][Farbe2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][Paintjob]=-1;
Spectating[playerid][0]=-1;
And on the top:
new Carlist[MAX_PLAYERS][ahCar];

wtf?
Reply
#2

When you make an array, you can't use equations for values. You need to know an exact number, if you would have looked up on the wiki, you would have found out that MAX_PLAYER_NAME is equal to 24 and +4 is equal to 28, which is the exact number you need.
Reply
#3

So I have change

Carlist[MAX_PLAYERS][ahCar]
to:

Carlist[28][ahCar]

or what ?

I don't really understand your Post :/
Reply
#4

Quote:
Originally Posted by Pixonut
When you make an array, you can't use equations for values. You need to know an exact number, if you would have looked up on the wiki, you would have found out that MAX_PLAYER_NAME is equal to 24 and +4 is equal to 28, which is the exact number you need.
Reply
#5

OK OK,

So I should change

new dateiname[MAX_PLAYER_NAME];
to new dateiname[28]; ?

:/
Reply
#6

Yes.
Reply
#7

Yes.

EDIT: Damn you pixonut.
Reply
#8

oh-oh.. doesn'T work.. Same Errors Oo
Reply
#9

Quote:
Originally Posted by Ryan7
oh-oh.. doesn'T work.. Same Errors Oo
https://sampwiki.blast.hk/wiki/Special:S...YER_NAME&go=Go
Reply
#10

Show us your new changed code.
Reply
#11

Carlist[playerid][Typ]=-1;
Is this the error?


I suggest u show
enum ahCar{
blablabla...
};
Reply
#12

Quote:
Originally Posted by yezizhu
Carlist[playerid][Typ]=-1;
Is this the error?


I suggest u show
enum ahCar{
blablabla...
};
You want to be a negative number or you want to lower it by one?
Reply
#13

As far as I can see, the error is not on the "new dateiname[..];" but on the next line. As you have a great amount of crap there..
Reply
#14

Okay, here is my related Script:

On the top:
Код:
enum ahCar
{
	Typ,
	Float:pPos2_x,
	Float:pPos2_y,
	Float:pPos2_z,
	Float:pPos2_rotation,
	Status,
	Lock,
	Carid,
	Paintjob,
	Farbe1,
	Farbe2,
	mod1,
	mod2,
	mod3,
	mod4,
	mod5,
	mod6,
	mod7,
	mod8,
	mod9,
	mod10,
	mod11,
	mod12,
	mod13,
	mod14,
	mod15,
	mod16,
	mod17,
};
new Carlist[MAX_PLAYERS][ahCar];
Then here where my Error is:

Код:
	new dateiname[28];
(errorline)Carlist[playerid][Typ]=-1; Carlist[playerid][ahX]=0.0; Carlist[playerid][ahY]=0.0; Carlist[playerid][ahZ]=0.0;
	Carlist[playerid][ahRotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
	Carlist[playerid][Farbe1]=-1; Carlist[playerid][Farbe2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
	Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
	Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
	Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
	Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][Paintjob]=-1;
	Spectating[playerid][0]=-1;
Reply
#15

Carlist[playerid][ahX]=0.0; Carlist[playerid][ahY]=0.0; Carlist[playerid][ahZ]=0.0;

these do not exist.

also: please post where you have it in. Is it in a command or what?
Reply
#16

Hell yell,zero has suspected the error correctly^^
Reply
#17

Quote:
Originally Posted by yezizhu
Hell yell,zero has suspected the error correctly^^
Yeah, thanks zero.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)