i dont get this ? what does it mean? -
AlbanianGuy - 25.02.2010
Код:
.pwn(5077) : error 001: expected token: "-identifier-", but found "-integer value-"
.pwn(5084) : error 010: invalid function or declaration
lines 5077 - 5084 are here
Код:
enum
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON,
}; // 5084
can this be fixed ?
Re: i dont get this ? what does it mean? -
Torran - 25.02.2010
have you tried
enum NAMEHERE
{
REST
Re: i dont get this ? what does it mean? -
VonLeeuwen - 25.02.2010
Код:
enum [name]
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON;
}
I was thinking of this..
Re: i dont get this ? what does it mean? -
Torran - 25.02.2010
Quote:
Originally Posted by VonLeeuwen
Код:
enum
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON;
}
I was thinking of this..
|
I think thats wrong, I checked seifadmin and ladmin enums and they end in , not ;
And };
Re: i dont get this ? what does it mean? -
adsy - 25.02.2010
https://sampwiki.blast.hk/wiki/Keywords:Initialisers#enum
Re: i dont get this ? what does it mean? -
BlackFoX - 25.02.2010
Код:
enum enumName
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON
}
Re: i dont get this ? what does it mean? -
VonLeeuwen - 25.02.2010
Quote:
Originally Posted by Torran
Quote:
Originally Posted by VonLeeuwen
Код:
enum
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON;
}
I was thinking of this..
|
I think thats wrong, I checked seifadmin and ladmin enums and they end in , not ;
And };
|
Ah Ok, never used Enums, so you must be right
Re: i dont get this ? what does it mean? -
adsy - 25.02.2010
you beat me to it blackfox
every entry must be seperated by a comma and the last one should be left blank
unlike an array ie
Код:
new something[] = {
1,2,3,4,5
};
you dont need the final ;
Re: i dont get this ? what does it mean? -
AlbanianGuy - 25.02.2010
now i dont have thi error in line 5084 but i only have the erro in line 5077 when i used
Код:
enum
{
TEAM_WEST, //5077
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON;
}
Re: i dont get this ? what does it mean? -
BlackFoX - 25.02.2010
Код:
enum enumName
{
TEAM_WEST,
TEAM_SOUTH,
TEAM_NORTH,
TEAM_STAR,
TEAM_EAST,
TEAM_SUN,
TEAM_MOON
}
Re: i dont get this ? what does it mean? -
AlbanianGuy - 25.02.2010
it keeps saying hte error in line 5077 , and if i erase taht line it will say for hte line 5078 and so one .. so whats the mistake there ?
Re: i dont get this ? what does it mean? -
BlackFoX - 25.02.2010
you forget the Name for the enum.
Код:
enum bla{
value_bla
}
bla(value_bla) = 1;
new varx[bla];
if(var[value_bla])
var[value_bla] = 2;
if you dont know how you can use it