F*cking Errors -
Ryhanna - 26.03.2009
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?
Re: F*cking Errors -
Pixels^ - 26.03.2009
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.
Re: F*cking Errors -
Ryhanna - 26.03.2009
So I have change
Carlist[MAX_PLAYERS][ahCar]
to:
Carlist[28][ahCar]
or what ?
I don't really understand your Post :/
Re: F*cking Errors -
Mikep - 26.03.2009
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.
|
Re: F*cking Errors -
Ryhanna - 26.03.2009
OK OK,
So I should change
new dateiname[MAX_PLAYER_NAME];
to new dateiname[28]; ?
:/
Re: F*cking Errors -
Pixels^ - 26.03.2009
Yes.
Re: F*cking Errors -
Mikep - 26.03.2009
Yes.
EDIT: Damn you pixonut.
Re: F*cking Errors -
Ryhanna - 26.03.2009
oh-oh.. doesn'T work.. Same Errors Oo
Re: F*cking Errors -
RobertGraham - 26.03.2009
Quote:
Originally Posted by Ryan7
oh-oh.. doesn'T work.. Same Errors Oo
|
https://sampwiki.blast.hk/wiki/Special:S...YER_NAME&go=Go
Re: F*cking Errors -
Pixels^ - 26.03.2009
Show us your new changed code.
Re: F*cking Errors -
yezizhu - 26.03.2009
Carlist[playerid][Typ]=-1;
Is this the error?
I suggest u show
enum ahCar{
blablabla...
};
Re: F*cking Errors -
Dujma - 26.03.2009
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?
Re: F*cking Errors -
mamorunl - 26.03.2009
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..
Re: F*cking Errors -
Ryhanna - 26.03.2009
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;
Re: F*cking Errors -
mamorunl - 26.03.2009
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?
Re: F*cking Errors -
yezizhu - 26.03.2009
Hell yell,zero has suspected the error correctly^^
Re: F*cking Errors -
Ryhanna - 28.03.2009
Quote:
Originally Posted by yezizhu
Hell yell,zero has suspected the error correctly^^
|
Yeah, thanks zero.