PDA

View Full Version : help guys


kevi11
17/06/2016, 08:08 AM
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(68) : error 001: expected token: "}", but found "-identifier-"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(72) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(317) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(321) : error 017: undefined symbol "DIALOG_REGISTRAZIONE"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(500) : error 017: undefined symbol "DIALOG_REGISTRAZIONE"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(505) : error 017: undefined symbol "DIALOG_REGISTRAZIONE"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(517) : error 017: undefined symbol "DIALOG_SUCCESSO_1"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(520) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(529) : error 017: undefined symbol "DIALOG_SUCCESSO_2"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(533) : error 017: undefined symbol "DIALOG_LOGIN"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.

enum
{
DIALOG_UNUSED,
DIALOG_ARMI, // 1
DIALOG_DROGA // 2
DIALOG_REGISTRAZIONE, 1
DIALOG_LOGIN, 2
DIALOG_SUCCESSO_1, 3
DIALOG_SUCCESSO_2 4
};

Sjn
17/06/2016, 08:27 AM
Enumerators cannot be used like that. You don't even need enums to define dialogs.

Define them like this instead.


#define DIALOG_UNUSED 0
#define DIALOG_ARMI 1
#define DIALOG_DROGA 2
#define DIALOG_REGISTRAZIONE 3
#define DIALOG_LOGIN 4
#define DIALOG_SUCCESSO_1 5
#define DIALOG_SUCCESSO_2 6


Note that every dialog should have unique IDs. If you define 2 dialogs with the same ID, it will be mixed up in the script.