Loading Issues - Y_INI
#1

Can't figure out what I did wrong. Once I restart my server, no radio stations are loaded.

removed

Willing to give some rep points.
Reply
#2

The problem is with login..
Код:
LoadStatios()
{
    for(new idx; idx < sizeof(XMRInfo); idx++)
	{
    	new gFile[64];
     	format(gFile, sizeof(gFile), "Stations/%d.ini" ,idx);
     	if(fexist(gFile))
     	{
            INI_ParseFile(gFile, "OnLoadStation_%s", .bExtra = true, .extra = idx);
      	}
    }
    return 1;
}

forward OnLoadStation_id(idx,name[],value[]);
public OnLoadStation_id(idx,name[],value[])
{
       INI_String("XMName", XMRInfo[idx[XMName], MAX_PLAYER_NAME);
       INI_String("XMStation", XMRInfo[idx][XMStation], 96);
       return 1;
}
Do SetTag with "id' not "Station Data"
Reply
#3

Quote:
Originally Posted by Kenway
Посмотреть сообщение
The problem is with login..
Код:
LoadStatios()
{
    for(new idx; idx < sizeof(XMRInfo); idx++)
	{
    	new gFile[64];
     	format(gFile, sizeof(gFile), "Stations/%d.ini" ,idx);
     	if(fexist(gFile))
     	{
            INI_ParseFile(gFile, "OnLoadStation_%s", .bExtra = true, .extra = idx);
      	}
    }
    return 1;
}

forward OnLoadStation_id(idx,name[],value[]);
public OnLoadStation_id(idx,name[],value[])
{
       INI_String("XMName", XMRInfo[idx[XMName], MAX_PLAYER_NAME);
       INI_String("XMStation", XMRInfo[idx][XMStation], 96);
       return 1;
}
Do SetTag with "id' not "Station Data"
Login? What are you on about?
Reply
#4

I still need help!
Reply
#5

Change this:

pawn Код:
INI_ParseFile(StationPath(s), "LoadStationData", false, true, s, true, false);
To this:

pawn Код:
INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = s);
And then add this somewhere in your mode:

pawn Код:
forward LoadVehicleData(stationid, name[], value[]);
public LoadVehicleData(stationid, name[], value[])
{
    INI_String("XMName", XMRInfo[stationid][XMName], MAX_PLAYER_NAME);
    INI_String("XMStation", XMRInfo[stationid][XMStation], 96);
}
I don't really know how to use y_ini so it may or may not work.
Reply
#6

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Change this:

pawn Код:
INI_ParseFile(StationPath(s), "LoadStationData", false, true, s, true, false);
To this:

pawn Код:
INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = s);
And then add this somewhere in your mode:

pawn Код:
forward LoadVehicleData(stationid, name[], value[]);
public LoadVehicleData(stationid, name[], value[])
{
    INI_String("XMName", XMRInfo[stationid][XMName], MAX_PLAYER_NAME);
    INI_String("XMStation", XMRInfo[stationid][XMStation], 96);
}
I don't really know how to use y_ini so it may or may not work.
Works fine!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)