SA-MP Forums Archive
error 001: expected token: "-identifier-", but found "(" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 001: expected token: "-identifier-", but found "(" (/showthread.php?tid=418790)



error 001: expected token: "-identifier-", but found "(" - Luigy - 26.02.2013

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



Re: error 001: expected token: "-identifier-", but found "(" - Scrillex - 26.02.2013

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

e_bInDM


Respuesta: error 001: expected token: "-identifier-", but found "(" - deb014 - 26.02.2013

try this...

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



Re: error 001: expected token: "-identifier-", but found "(" - Noles2197 - 26.02.2013

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

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



Re : error 001: expected token: "-identifier-", but found "(" - yusei - 26.02.2013

new g_Bit1_Data[MAX_PLAYERS][e_Bit1_Data]; // Line 14


Re: error 001: expected token: "-identifier-", but found "(" - RajatPawar - 26.02.2013

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



Re: error 001: expected token: "-identifier-", but found "(" - DaRk_RaiN - 26.02.2013

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

new g_Bit1_Data[e_Bit1_Data] [MAX_PLAYERS]; //



Re: error 001: expected token: "-identifier-", but found "(" - RajatPawar - 26.02.2013

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. ( }; )


Re: error 001: expected token: "-identifier-", but found "(" - DaRk_RaiN - 26.02.2013

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.


Re: error 001: expected token: "-identifier-", but found "(" - Luigy - 26.02.2013

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.