Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Nothing wrong with the enum itself. Show the surrounding code for OnDialogResponse.
Posts: 596
Threads: 75
Joined: Nov 2015
I think its because you are not setting the value of the dialogs (dialogids)
Try doing it like this:
Код:
enum dialogs
{
DIALOG_LOGIN,
DIALOG_REGISTER,
DIALOG_SEX,
DIALOG_AGE,
DIALOG_EMAIL
}
new DialogID[dialogs];
DialogID[DIALOG_LOGIN] = 1 /*Any unique id*/;
DialogID[DIALOG_REGISTER] = 2 /*Any unique id*/;
DialogID[DIALOG_SEX] = 3 /*Any unique id*/;
DialogID[DIALOG_AGE] = 4 /*Any unique id*/;
DialogID[DIALOG_EMAIL] = 5 /*Any unique id*/;
Posts: 596
Threads: 75
Joined: Nov 2015
Quote:
Originally Posted by Deadpoop
No need to set id''s because enum allready does that
DIALOG_LOGIN //= 0
DIALOG_REGISTER //= 1
...
|
What if you want to set the id to 100 or any other unique id to prevent dialog ids collision?
Read the post before commenting.Or take English learning classes if you can't understand basic sentences.
Quote:
Originally Posted by K0P
/*Any unique id*/;
|
Posts: 1,276
Threads: 6
Joined: Aug 2014
Quote:
Originally Posted by K0P
What if you want to set the id to 100 or any other unique id to prevent dialog ids collision?
Read the post before commenting.Or take English learning classes if you can't understand basic sentences.
|
You could just do enum { DIALOG_REGISTER = 100 }; then it'll increment.
Posts: 596
Threads: 75
Joined: Nov 2015
Quote:
Originally Posted by Konstantinos
Search for "#define DIALOG_LOGIN .." in your script and remove it (where .. is a number).
Collisions have nothing to do with compiling and the error he gets.
|
But it has a bad effect on dialogs that have responses.