SA-MP Forums Archive
expected token: "-identifier-", but found "-integer value-" - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: expected token: "-identifier-", but found "-integer value-" (/showthread.php?tid=132258)



expected token: "-identifier-", but found "-integer value-" - Torran - 06.03.2010

pawn Код:
enum Info
{
    AdminLevel,
    Password[150],
    Gender, // THE LINE
    Cash,
    Score,
    Warns,
    Jail,
    Logged,
    Mute,
    WarnReason1[128],
    WarnReason2[128],
    WarnReason3[128],
    IP[20],
};
new AccountInfo[MAX_PLAYERS][Info];
Код:
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(31) : error 001: expected token: "-identifier-", but found "-integer value-"
I dont get that? It shouldnt say that? Does anyone know whats wrong?
Im running SeifAdmin, Tell me if you want to see any other code


Re: expected token: "-identifier-", but found "-integer value-" - pen_theGun - 06.03.2010

....
WarnReason2[128],
WarnReason3[128],
IP[20],
}:


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 06.03.2010

Not working


Re: expected token: "-identifier-", but found "-integer value-" - Chrham_2 - 07.03.2010

Quote:
Originally Posted by Torran
Not working
you have to remove the , on IP[20]


Re: expected token: "-identifier-", but found "-integer value-" - Miguel - 07.03.2010

pawn Код:
enum Info
{
    AdminLevel,
    Password[150],
    Gender, // THE LINE
    Cash,
    Score,
    Warns,
    Jail,
    Logged,
    Mute,
    WarnReason1[128],
    WarnReason2[128],
    WarnReason3[128],
    IP[20]
}



Re: expected token: "-identifier-", but found "-integer value-" - Westie - 07.03.2010

Quote:
Originally Posted by Chrham_2
Quote:
Originally Posted by Torran
Not working
you have to remove the , on IP[20]
Err... no you don't, actually.



Looks like there are invalid characters in the code, that might cause the problem, without any formatting your code compiles successfully.


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 07.03.2010

If i do what you did there is no invalid code..
Also all the errors go away if i remove Gender,


Re: expected token: "-identifier-", but found "-integer value-" - Carlton - 07.03.2010

Did you try what SAWC gave? His code he given you was the correct fix for your code.


Re: expected token: "-identifier-", but found "-integer value-" - bajskorv123 - 07.03.2010

This is a guess but i think the array above Gender (Password) has a too big array, make it 64 or 128 or something...


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 07.03.2010

Quote:
Originally Posted by Carlton
Did you try what SAWC gave? His code he given you was the correct fix for your code.
Quote:
Originally Posted by pen_†ĥęGun
....
WarnReason2[128],
WarnReason3[128],
IP[20],
}:
Quote:
Originally Posted by Torran
Not working
I already have, Its not working, Ifyou download seifadmin you wil see that the comma is there,
And the pasword array is same and it compiles perfct, Its just when i add gender


Re: expected token: "-identifier-", but found "-integer value-" - Carlton - 07.03.2010

Quote:
Originally Posted by Torran
Quote:
Originally Posted by Carlton
Did you try what SAWC gave? His code he given you was the correct fix for your code.
Quote:
Originally Posted by pen_†ĥęGun
....
WarnReason2[128],
WarnReason3[128],
IP[20],
}:
Quote:
Originally Posted by Torran
Not working
I already have, Its not working, Ifyou download seifadmin you wil see that the comma is there,
And the pasword array is same and it compiles perfct, Its just when i add gender
No, I meant in your enumeration you have a }: at the end, which is not needed.

Edit: Just figured out it could be needed.


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 07.03.2010

Im not doing what you all saying because i know it works without it,
Its not the } or the commas or nothing, Its the word gender,
It al works if i remove gender,
It might be the way i added gender throughout the code,
Il try change it ina bit, But atm, Anyone got any suggestions?

EDIT:

With Gender,

Код:
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(33) : error 001: expected token: "-identifier-", but found "-integer value-"
Without gender,

Код:
That error disasppears but other errors are there because thats not there..
Atleast i think anyway, It just says somethng about AccountInfo and tag mismatch,

Код:
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(179) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(179) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(223) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(223) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(283) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(283) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(343) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(343) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(369) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(369) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(380) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(380) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(400) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(400) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(498) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(498) : error 032: array index out of bounds (variable "AccountInfo")
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(520) : warning 213: tag mismatch
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(520) : error 032: array index out of bounds (variable "AccountInfo")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
I think i had them when gender was there too


Re: expected token: "-identifier-", but found "-integer value-" - ¤Adas¤ - 07.03.2010

Maybe it is because of large variable indexes. Password with length 150?


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 07.03.2010

Its the word gender thats causing it, Nothing else


Re: expected token: "-identifier-", but found "-integer value-" - ¤Adas¤ - 07.03.2010

I don't think... It is really strange error...

EDIT: Maybe I have it!

pawn Код:
enum Info
{
    AdminLevel,
    Password[150],
    Gender,
    Cash,
    Score,
    Warns,
    Jail,
    Logged,
    Mute,
    WarnReason1[128],
    WarnReason2[128],
    WarnReason3[128],
    IP[20]
}

new AccountInfo[MAX_PLAYERS][Info];



Re: expected token: "-identifier-", but found "-integer value-" - Rzzr - 07.03.2010

Quote:
Originally Posted by ¤Adas¤
Maybe it is because of large variable indexes. Password with length 150?
With Whirlpool, yes.

@Torran.
What happens if you put Gender before Password?


Re: expected token: "-identifier-", but found "-integer value-" - Torran - 07.03.2010

Same error


Re: expected token: "-identifier-", but found "-integer value-" - pen_theGun - 07.03.2010

Show us the lines 179 - 520