21.05.2012, 19:22
I've made this code to load the next mission available, but it seems to load the same mission again, it does not load the other one any idea what i'm doing wrong?
pawn Код:
stock LoadNewMission()
{
new file[64],mapid;
for( ; mapid != MAX_MISSION_FILES; ++mapid)
{
format(file,sizeof(file),"/Missions/%d.ini",mapid);
if(fexist(file))
{
mapid++;
}
}
format(file, sizeof(file), "/Missions/%d.ini", mapid);
if(fexist(file))
{
LastMissionStarted = mapid;
return mapid;
}
else return printf("[NOTICE] File Bugged.");
}