Right, I have finally got back on track with the Crumbling Stage gamemode I am working on and inside the MapCycle.cs which I am working on, I seem to be getting a huge problem with how it echo's. For example when the slayer ends the round it'll clear all the bricks and it'll find the next file, but the problem is that it only finds the same file it loaded last time.
if(ClientGroup.getCount() <= 5)
{
announce("\c3Loading a map for the Player Count of 5 or under.");
if( !%file $="" )
{
%file = findNextFile("saves/CStages/5/*/*.bls");
}
else
{
%file = findFirstFile("saves/CStages/5/*/*.bls");
}
announce(%file @ " has been selected."); //debug
}
but i have been suggested to use for statements, but that'd be stupid
for(%file = FindFirstFile("saves/Cstages/5/*/*.bls") ; !%file = "" ; %file = findNextFile("saves/CStages/5/*/*.bls") {
Announce(%file); //i figured this was stupid
}
I have had thoughts that it'd be to do with the global and local variable thing, but yet I am still unsure.
I have not touched this since 2 weeks ago at the most, i should be putting this in Coding Help but since you're working on a mapcycle add-on, i thought it'd be relevant.
EDIT:
Changed the variable to global, it still gave me the same outcome.