
Originally Posted by
TomTop
Yeah I am, but instead of exit i have " terminatescript;".
I don't see any immediate differences so I'll show you what works for me.
Simba Code:
procedure declarePlayers();
var
i: integer;
begin
players.setup(playerForm.players);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
integers[SET_RESTFOR] := strToInt(playerForm.players[i].settings[0]) * 60 * 1000;
integers[SET_RESTEVERY] := strToInt(playerForm.players[i].settings[1]) * 60 * 1000;
integers[SET_SLEEPFOR] := strToInt(playerForm.players[i].settings[2]) * 60 * 1000;
integers[SET_SLEEPEVERY] := strToInt(playerForm.players[i].settings[3]) * 60 * 1000;
integers[SET_SWITCHEVERY] := strToInt(playerForm.players[i].settings[4]) * 60 * 1000;
world := strToInt(playerForm.players[i].settings[5]);
booleans[SET_RESTING] := strToBool(playerForm.players[i].settings[6]);
booleans[SET_SLEEPING] := strToBool(playerForm.players[i].settings[7]);
end;
Debug := strToBool(playerForm.players[0].settings[8]);
end;
That's at the top of the script.
At the bottom of the script:
Simba Code:
procedure initPlayerForm();
begin
with playerForm do
begin
name := '3Garrett3''s Evergreen Chopper'; // the title of the SPF, usually the name of your script
scriptHelpThread := ''; // a link to a help thread, if set to '' will link to my setup guide
scriptSettingsPath := ''; // where you want the settings file to be saved; saved in script's path by default
editBoxLabels := ['Minutes to Rest for', 'Minutes before Resting', 'Minutes to Sleep for', 'Minutes before Sleeping', 'Switch After', 'World']; // edit boxes are created for each array element
editBoxDefaults := ['30', '90', '180', '180', '180', '-1']; // optional default values for each edit box; array length must equal editBoxLabel length
checkBoxLabels := ['Break', 'Sleep', 'Debug']; // same as editBoxLabels but for check boxes
checkBoxDefaults := ['True', 'True', 'False'];
end;
end;
and
Simba Code:
initPlayerForm();
runPlayerForm();
if (not playerForm.isScriptReady) then
terminateScript;
//...
declarePlayers();
setupSRL();
If everything matches your layout, it's something over my head.