Need help with this error
#1

I get this error

PHP код:
C:\Users\Baki\Desktop\developer\pawno\include\sscanf2.inc(42) : error 001expected token";"but found "native" 
Here is the script where the error occurs

PHP код:
enum    _:e_lockmodes
{
    
LOCK_MODE_NOLOCK,
    
LOCK_MODE_PASSWORD,
    
LOCK_MODE_KEYS,
    
LOCK_MODE_OWNER
}
enum    _:e_selectmodes
{
    
SELECT_MODE_NONE,
    
SELECT_MODE_EDIT,
    
SELECT_MODE_SELL

would rep you if you helped me
Reply
#2

Код HTML:
enum    _:e_lockmodes 
{ 
    LOCK_MODE_NOLOCK, 
    LOCK_MODE_PASSWORD, 
    LOCK_MODE_KEYS, 
    LOCK_MODE_OWNER 
}; 

enum    _:e_selectmodes 
{ 
    SELECT_MODE_NONE, 
    SELECT_MODE_EDIT, 
    SELECT_MODE_SELL 
};
Reply
#3

Still same error eh...
here is all

PHP код:
enum    _:e_lockmodes
{
    
LOCK_MODE_NOLOCK,
    
LOCK_MODE_PASSWORD,
    
LOCK_MODE_KEYS,
    
LOCK_MODE_OWNER
};
enum    _:e_selectmodes
{
    
SELECT_MODE_NONE,
    
SELECT_MODE_EDIT,
    
SELECT_MODE_SELL
};
enum    _:e_dialogids
{
    
DIALOG_BUY_HOUSE 7500,
    
DIALOG_HOUSE_PASSWORD,
    
DIALOG_HOUSE_MENU,
    
DIALOG_HOUSE_NAME,
    
DIALOG_HOUSE_NEW_PASSWORD,
    
DIALOG_HOUSE_LOCK,
    
DIALOG_SAFE_MENU,
    
DIALOG_SAFE_TAKE,
    
DIALOG_SAFE_PUT,
    
DIALOG_GUNS_MENU,
    
DIALOG_GUNS_TAKE,
    
DIALOG_FURNITURE_MENU,
    
DIALOG_FURNITURE_BUY,
    
DIALOG_FURNITURE_SELL,
    
DIALOG_VISITORS_MENU,
    
DIALOG_VISITORS,
    
DIALOG_KEYS_MENU,
    
DIALOG_KEYS,
    
DIALOG_SAFE_HISTORY,
    
DIALOG_MY_KEYS,
    
DIALOG_BUY_HOUSE_FROM_OWNER,
    
DIALOG_SELL_HOUSE,
    
DIALOG_SELLING_PRICE
};
enum    e_house
{
    
Name[MAX_HOUSE_NAME],
    
Owner[MAX_PLAYER_NAME],
    
Password[MAX_HOUSE_PASSWORD],
    
Address[MAX_HOUSE_ADDRESS],
    
FloathouseX,
    
FloathouseY,
    
FloathouseZ,
    
Price,
    
SalePrice,
    
Interior,
    
LockMode,
    
SafeMoney,
    
LastEntered,
    
Text3DHouseLabel,
    
HousePickup,
    
HouseIcon,
    
boolSave
};
enum    e_interior
{
    
IntName[MAX_INT_NAME],
    
FloatintX,
    
FloatintY,
    
FloatintZ,
    
intID,
    
Text3DintLabel,
    
intPickup
};
enum    e_furnituredata
{
    
ModelID,
    
Name[32],
    
Price
};
enum    e_furniture
{
    
SQLID,
    
HouseID,
    
ArrayID,
    
FloatfurnitureX,
    
FloatfurnitureY,
    
FloatfurnitureZ,
    
FloatfurnitureRX,
    
FloatfurnitureRY,
    
FloatfurnitureRZ
};
enum    e_sazone
{
    
SAZONE_NAME[28],
    
FloatSAZONE_AREA[6]
}; 
Reply
#4

If you remove that _: behind the enumerator name will it compile fine?
Reply
#5

I did that but it brings a lot of errors
Reply
#6

Yeah because that's not the problem lol

it's coming from your sscanf2 Include

PHP код:
C:\Users\Baki\Desktop\developer\pawno\include\sscanf2.inc(42) : error 001expected token";"but found "native" 
Send us Line 40 - 45
Reply
#7

Well then I guess you have to fix them. I have never seen any script declaring enumerators that way. This operator _: or idk what it is called is to get the enumerator elements number (useful in loops)

EDIT: I just saw above reply. I could be wrong but I was just trying to help. Sorry
Reply
#8

_: clears the enum tag, so you dont' have to use _: every time you loop through it later.
Reply
#9

Quote:
Originally Posted by Misiur
Посмотреть сообщение
_: clears the enum tag, so you dont' have to use _: every time you loop through it later.
Interesting thanks for correcting me
Reply
#10

PHP код:
native sscanf(const data[], const format[], {Float,_}:...);
native unformat(const data[], const format[], {Float,_}:...) = sscanf;
native SSCANF_Init(playersinvalidlen);
native SSCANF_Join(playerid, const name[], npc);
native SSCANF_Leave(playerid);
native SSCANF_Option(const name[], value); 
This is from my sscanf2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)