There are only commands to the client in server.cs and commands to the server in client.cs; it's setup correctly.
function PTG_MainMenu_GUI::onWake()
{
commandToServer('PTG_GUI_RestrictionCheck');
}
function PTG_TempMainMenu_GUI::onWake()
{
commandToServer('PTG_GUI_RestrictionCheck');
}
function PTG_BiomeOptions_GUI::onWake()
{
commandToServer('PTG_GUI_RestrictionCheck');
}
function PTG_Preview_GUI::onWake()
{
commandToServer('PTG_GUI_RestrictionCheck');
}
function PTG_CustomHV_GUI::onWake()
{
commandToServer('PTG_GUI_RestrictionCheck');
}
Uhhh
if(!$Server::Dedicated)
Uhhh
function ServerCmdPTG_GUI_IntStartRoutine(%client) <- server-sided function
-----
MessageBoxOK("PTG: ERROR!","Routine already started!"); <-client-sided code
-----
if($UseSd==0)
{
if(($GSx || $GSy)!=0)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","When using custom height values, Grid Start X & Y must be = to 0.");
return;
}
if(($GEx<=0 || $GEx>($ChS*15)) || ($GEy<=0 || $GEy>($ChS*15)))
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","When using custom height values, Grid End X & Y must be > 0 and <= 15 Chunks (or the Chunk Size * 15).");
return;
}
}
if($GEx<=$GSx || $GEy<=$GSy)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Grid Start must be < Grid End.");
return;
}
if($FloI==1 && ($SanL>0 || $WatL>0))
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Please set the Sand and Water Levels to 0 when generating Floating Islands.");
return;
}
if($PrevPass==1)
{
PrevList.clear();
PrevList.Extent = (($GEx-$GSx)*2) @ " " @ (($GEy-$GSy)*2);
canvas.pushDialog(PTG_Preview_GUI);
}
if($PrevPass!=1)
{
if($ModTer==1)
{
if($AddOn__Brick_ModTer_4xPack==-1)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Brick_ModTer_4xPack is not enabled! Make sure you have downloaded and enabled the Add-On before generating Modular Terrain, or disable the Modular Terrain option to use Large Cube bricks instead.");
return;
}
if($PlaC==1)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Please disable Plate-Capping when using the Modular Terrain option.");
return;
}
if($TerHS!=1 && $TerHS!=2)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Please set the Terrain Z-Scale to either 1 or 2 when using the Modular Terrain option.");
return;
}
$FxCB = brick4Cube1Data;
$STxCB = brick16Cube1PTGMTData;
$WtB = brick32wPTGMTData;
}
if($ModTer==0)
{
if($AddOn__Brick_Large_Cubes==-1)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Brick_Large_Cubes is not enabled! Make sure you have downloaded and enabled the Add-On before generating terrain, or enable the Modular Terrain option instead.");
return;
}
$FxCB = brick4xCubeData;
$STxCB = brick16xCubeData;
$WtB = brick32xWaterData;
}
if($GFill==1)
{
if($SolG==0)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Please enable Solid Ground when using the Ground Gap-Filling option.");
return;
}
if($TerHS==1 || $TerHS==2)
{
canvas.popDialog(PTG_MainMenu_GUI);
canvas.pushDialog(PTG_MainMenu_GUI);
MessageBoxOK("PTG: ERROR!","Ground Gap-Filling is not necessary when Terrain Z-Scale is set to a value of either 1 or 2.");
return;
}
}
%clN=$cl.Name;
^^^^ client- and server-sided random mixture
Uhhhhhhhh
I don't think that's setup correctly :(