28.09.2018, 11:47
Hi, i have some problem with loading ... Let me explain...
I have this code:
Now, i need to load saved files (SAVING IS WORKING SO I DONT POST IT HERE),
i tried 3 kinds of ParseFile, 0 of them works how i want. I tried many combinations,
not only this 3 but nothing work ..
Here i need to load data and make pickup with SomeValue help.
THE PROBLEM IS WITH PARSEFILE, in some case it LOADS STRING but NOT LOAD PICKUP and 3DTEXT
or LOAD PICKUP and 3DTEXT but NOT LOAD STRING...
I need to load evrything ... Any idea?
I have this code:
Код:
#define MAX_SOMEINFO 50 enum SomeInfo { SomeString[64], SomeString2[16], SomeValue }
i tried 3 kinds of ParseFile, 0 of them works how i want. I tried many combinations,
not only this 3 but nothing work ..
Код:
public OnGameModeInit() { INI_ParseFile("SomeInfos/SI1.ini", "LoadSI1_data", .bExtra = true, .extra = 0); // THIS NO LOAD SomeString AND NO LOAD pickup and 3Dtext INI_ParseFile("SomeInfos/SI1.ini", "LoadSI1_data", .bPassTag = true); //THIS LOAD SomeString, but NO LOAD pickup and 3Dtext INI_ParseFile("SomeInfos/SI1.ini", "LoadSI1_data", .bExtra = true, .extra = 1); // THIS LOAD pickup and 3Dtext but NO LOAD SomeString return 1; }
Код:
forward LoadSI1_data(tag[], name[], value[]); public LoadSI1_data(tag[], name[], value[]) { INI_String("SomeString", SomeInfo[1][SomeString], 64); INI_String("SomeString2", SomeInfo[1][SomeString2], 16); INI_Int("SomeValue", SomeInfo[1][SomeValue]); if(SomeInfo[1][SomeValue] == 0) { new text[128], 3DS1; SomePickup[1] = CreatePickup(19524,1,1952.8840,-2178.9063,13.5469,0); format(text, sizeof(text), "{FFDD00}%s\n", SomeInfo[1][SomeString]); 3DS1 = Create3DTextLabel(text, 0xFFFFFFFF, 1952.8840, -2178.9063, 15, 15.0, 0, 1); return 1; } else if(SomeInfo[1][SomeValue] == 1) { new text[128], 3DS12; PropPickup[1] = CreatePickup(19523,1,1952.8840,-2178.9063,13.5469,0); format(PIDstring1, sizeof(PIDstring1), "{FFDD00}%s",SomeInfo[1][SomeString2]); 3DSI2 = Create3DTextLabel(PIDstring1, 0xFFFFFFFF, 1952.8840, -2178.9063, 15, 15.0, 0, 1); return 1; } return 1; }
or LOAD PICKUP and 3DTEXT but NOT LOAD STRING...
I need to load evrything ... Any idea?