Difference
#1

Whats the difference between both codes?

PHP код:
enum 
{
    
DIALOG_TEST
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_TEST) { //code }
    
return 1;

PHP код:
#define DIALOG_TEST 1
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_TEST) { //code }
    
return 1;

Reply
#2

Not much, the enum makes it easier to order the dialog ids as it provides a value depending on the order.
Reply
#3

You don't have to worry about their ids you just keep them inserting in enum.
Reply
#4

Alright thanks.
Reply
#5

Note that DIALOG_TEST in the first equal to 0 though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)