i dont get this ? what does it mean?
#1

Код:
.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 ?
Reply
#2

have you tried

enum NAMEHERE
{
REST
Reply
#3

Код:
enum [name]
{
      TEAM_WEST,   //5077
	TEAM_SOUTH,
	TEAM_NORTH,
	TEAM_STAR,
	TEAM_EAST,
	TEAM_SUN,
	TEAM_MOON;
}
I was thinking of this..
Reply
#4

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 };
Reply
#5

https://sampwiki.blast.hk/wiki/Keywords:Initialisers#enum
Reply
#6

Код:
enum enumName
{
    TEAM_WEST,   //5077
	TEAM_SOUTH,
	TEAM_NORTH,
	TEAM_STAR,
	TEAM_EAST,
	TEAM_SUN,
	TEAM_MOON
}
Reply
#7

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
Reply
#8

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 ;
Reply
#9

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;
}
Reply
#10

Код:
enum enumName
{
    TEAM_WEST,
	TEAM_SOUTH,
	TEAM_NORTH,
	TEAM_STAR,
	TEAM_EAST,
	TEAM_SUN,
	TEAM_MOON
}
Reply
#11

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 ?
Reply
#12

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
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)