Dialog and Enum Compatability
#1

So I made a bunch of dialogs to a create a faction command but it doesn't save them to the enum I wanted does anyone know how to fix this. Here are the Dialogs. Here is the enum
PHP код:
enum fInfo
{
    
fName[100],
    
factionid,
    
rank1[100],
    
rank2[100],
    
rank3[100],
    
rank4[100],
    
rank5[100],
    
rank6[100],
    
rank7[100],
    
rank8[100],
    
rank9[100],
    
rank10[100],
    
skinidrank1,
    
skinidrank2,
    
skinidrank3,
    
skinidrank4,
    
skinidrank5,
    
skinidrank6,
    
skinidrank7,
    
skinidrank8,
    
skinidrank9,
    
skinidrank10
}
new 
FactionInfo[MAX_FACTION][fInfo]; 
Reply
#2

Ohh, well thats cuz there are no enums involved in your script.

To save your enums you have to add all those things on - OnPlayerDisconnect callback, you can read some tutorials about saving and loading systems.

And of course you have to give a value or index (dunno how to say that) to your enums, for example

Код:
 if(dialogid == 13) {
            if(!response) return 1;
                if(response)
                    {
                           FactionInfo[playerid][factionid] = 1;
                    }
          }
Sorry for idents.

Maybe i understood you wrong, there is second version.

change
Код:
INI_WriteString(File,"Rank2",inputtext);
to
Код:
INI_WriteString(File," FactionInfo[playerid][Rank2]",inputtext);
Reply
#3

Im still confused mind giving me an example within my script?
Reply
#4

The code you gave me to change it to doesn't work it just writes FactionInfo[playerid][Rank2] = what I typed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)