strange things happen #1 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: strange things happen #1 (
/showthread.php?tid=599496)
strange things happen #1 -
fordawinzz - 26.01.2016
so, using y_ini (correctly):
Код:
INI_ParseFile(missionFile, "LoadMission_%s");
Код:
function LoadMission_data(name[], value[])
{
new
string[10];
INI_String("mission_name", E_ACTIVE_MISSION[missionName], 30);
E_ACTIVE_MISSION[missionName][0] = toupper(E_ACTIVE_MISSION[missionName][0]);
print("Mission load");
INI_Int("mission_cps", E_ACTIVE_MISSION[missionCheckpoints]);
for (new i = 0; i < E_ACTIVE_MISSION[missionCheckpoints]; i++)
{
format(string, sizeof (string), "cp_%d_x", i+1);
INI_Float(string, E_ACTIVE_MISSION[missionCP_X][i]);
format(string, sizeof (string), "cp_%d_y", i+1);
INI_Float(string, E_ACTIVE_MISSION[missionCP_Y][i]);
format(string, sizeof (string), "cp_%d_z", i+1);
INI_Float(string, E_ACTIVE_MISSION[missionCP_Z][i]);
}
INI_String("creator", E_ACTIVE_MISSION[missionCreator], MAX_PLAYER_NAME);
INI_Int("reward", E_ACTIVE_MISSION[missionReward]);
INI_Float("distance", E_ACTIVE_MISSION[missionDistance]);
}
the file is also in the correct format. the function executes for ~10 TIMES (FFS). I also load other things with y_ini and this is not happening. WTF?
edit: I have actually seen that it executes for how many variables I load, this is so wrong ffs