error 001: expected token: "-identifier-", but found "("
#1

I'm using rBits:

https://sampforum.blast.hk/showthread.php?tid=275142

Why am I getting this error?

pawn Код:
error 001: expected token: "-identifier-", but found "("
Код:
C:\Users\Luigy\Desktop\test.pwn(14) : error 001: expected token: "-identifier-", but found "("
C:\Users\Luigy\Desktop\test.pwn(16) : warning 203: symbol is never used: "g_Bit1_Data"
Pawn compiler 3.2.3664                  Copyright © 1997-2006, ITB CompuPhase
 
 
1 Error.
pawn Код:
enum e_Bit1_Data {
    e_bSpawned,
    e_bIsDeath,
    e_bInDM,
    // ...
};
 
new g_Bit1_Data[e_Bit1_Data] <MAX_PLAYERS>; // Line 14
Reply
#2

No you were right.. but take out // and ,

e_bInDM
Reply
#3

try this...

pawn Код:
enum e_Bit1_Data {
    e_bSpawned,
    e_bIsDeath,
    e_bInDM
    // ...
};
 
new g_Bit1_Data[e_Bit1_Data] <MAX_PLAYERS>; // Line 14
Reply
#4

I tested what both of you suggested and still got this:

Код:
error 001: expected token: "-identifier-", but found "(
Reply
#5

new g_Bit1_Data[MAX_PLAYERS][e_Bit1_Data]; // Line 14
Reply
#6

pawn Код:
enum e_Bit1_Data
{
    e_bSpawned,
    e_bIsDeath,
    e_bInDM
    // ...
}
 
new g_Bit1_Data[MAX_PLAYERS][e_Bit1_Data];
Reply
#7

pawn Код:
enum e_Bit1_Data {
    e_bSpawned,
    e_bIsDeath,
    e_bInDM,
    // ...
};

new g_Bit1_Data[e_Bit1_Data] [MAX_PLAYERS]; //
Reply
#8

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
pawn Код:
enum e_Bit1_Data {
    e_bSpawned,
    e_bIsDeath,
    e_bInDM,
    // ...
};

new g_Bit1_Data[e_Bit1_Data] [MAX_PLAYERS]; //
That is wrong! There should be no comma at the end of 'e_bInDM' and no semi colon at the end of declaration of the enum. ( }; )
Reply
#9

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
That is wrong! There should be no comma at the end of 'e_bInDM' and no semi colon at the end of declaration of the enum. ( }; )
Non-sense, try it with and without the comma, compiles fine.
Reply
#10

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
pawn Код:
enum e_Bit1_Data
{
    e_bSpawned,
    e_bIsDeath,
    e_bInDM
    // ...
}
 
new g_Bit1_Data[MAX_PLAYERS][e_Bit1_Data];
Thanks man, this worked perfectly. Im'ma get some stuff rollin' with this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)