So upon my server reset function in the Mining mod I'm working on
function getDirts()
{
%filename = $Mining::Root @ "dirts.txt";
if(!isFile(%filename))
{
echo("You're missing the dirts database! (dirts.txt)");
return;
}
When it gets to this command, it thinks the file isn't there.
However when starting the server for the first time, and when doing the function manually, it says the file is there.
function resetServer()
{
noticeMessage("Deleting" SPC getBrickCount() SPC "bricks from the host's brickgroup...");
$Mining::Host.brickgroup.delete();
noticeMessage("Done, resetting global variables...");
deleteVariables("$Mining::*");
noticeMessage("Done, running miningInit();");
miningInit();
noticeMessage("Server reset.");
}
is the reset function
and
function miningInit()
{
if($Mining::HasStarted)
{
noticeMessage("Gamemode already initiated.");
return;
}
else
{
$Mining::HasStarted = 1;
}
$Mining::Host = new ScriptObject()
{
isAdmin = 1;
brickgroup = 0;
bl_id = getNumKeyID();
};
%brickgroup = new SimGroup("BrickGroup_" @ getNumKeyID())
{
client = 0;
bl_id = getNumKeyID();
name = "The Host";
};
$Mining::Host.brickgroup = %brickgroup;
mainBrickGroup.add($Mining::Host.brickgroup);
noticeMessage("Starting init commands...");
getOres();
getDirts();
newSpawn();
miningGUI();
checkBrickCount();
}
is the miningInit command.
Am I doing something wrong or is this a bug with Blockland?