y-ini loading help
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
You are saving with "GroupsData" tag, but you don't load it. Try
pawn Код:
public LoadGroups_GroupsData(id, name[], value[])
//(...) and
INI_ParseFile(file, "LoadGroups_%s", .bExtra = true, .extra = i);
did what u said still the same:

PHP код:
    new gfile[64];
    for(new 
iMAX_GROUPSi++)
    {
        
format(gfilesizeof(gfile), "Groups/%d.ini"i);
        if(
fexist(gfile))
        {
            
INI_ParseFile(file"LoadGroups_%s", .bExtra true, .extra i);
        }
    }
forward LoadGroups_GroupsData(idname[], value[]);
public 
LoadGroups_GroupsData(idname[], value[])
{
    
INI_String("GroupName"GroupInfo[id][gName],75);
    
INI_String("LeaderName"GroupInfo[id][gLeaderName], MAX_PLAYER_NAME);
    
INI_Int("Active"GroupInfo[id][gActive]);
    return 
1;

and this is how i check for groups

PHP код:
COMMAND:groups(playeridparams[])
{
    
ListGroups(playerid);
    return 
1;
}
stock ListGroups(playerid)
{
    new 
countstring[512];
    for (new 
0MAX_GROUPSi++)  
    {
        if(
GroupInfo[i][gActive] == 1)
        {
            
count++;
            
format(stringsizeof (string), "%s %s\n"stringGroupInfo[i][gName]);
        }
     }
    if (!
countSendClientMessage(playerid, -1"no groups");
    else 
ShowPlayerDialog(playerid286DIALOG_STYLE_MSGBOX"Groups"string"Close""");
    return 
1;

Reply


Messages In This Thread
y-ini loading help - by SalmaN97 - 20.11.2015, 23:45
Re: y-ini loading help - by Misiur - 21.11.2015, 00:26
Re: y-ini loading help - by SalmaN97 - 21.11.2015, 01:34
Re: y-ini loading help - by Yochui - 21.11.2015, 07:14
Re: y-ini loading help - by SalmaN97 - 21.11.2015, 11:26

Forum Jump:


Users browsing this thread: 2 Guest(s)