Solved!
Solved!
Well, the first error i had spotted was this:That obviously tells us that a procedure has been called, but it's unknown. This is the line:Code:[Runtime Error] : Exception: Unknown procedure in line 120 in scriptThere is no InitForm in your script. It is replaced by the procedure form. So change that to 'form' and you'll be off this error.SCAR Code:ThreadSafeCall('InitForm', v);
That's all the errors from your script.
As for your second question, the reason that is because a string cannot be called as an integer. Since edit1.text is a string and f and 0 is an integer. Read up on tutorials about the differences between them two
Good luck. Any more help needed? Please post![]()
You may contact me with any concerns you have.
Are you a victim of harassment? Please notify me or any other staff member.
| SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |
I have solved my problem by using a function that makes a string into a integer if you plan on doing an example use this also copy my owl script on the form may help clear it out for noobies:
SCAR Code:program Copperminerdelux;
{.include SRL\SRL.scar}
var
frmdesign : tform;
loads : tlabel;
edit1 : tedit;
button1 : tbutton;
loadn : String;
I, u, g, f, abc: integer;
procedure ButtonClick(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:=MrOk;
end;
procedure initform;
begin
frmdesign := createform;
frmdesign.left := 459;
frmdesign.top := 270;
frmdesign.width := 274;
frmdesign.height := 292;
frmdesign.caption := 'choose loads #';
frmdesign.color := clbtnface;
frmdesign.font.color := clwindowtext;
frmdesign.font.height := 30;
frmdesign.font.name := '@batang';
frmdesign.font.style := [];
frmdesign.visible := false;
frmdesign.pixelsperinch := 96;
loads := tlabel.create(frmdesign);
loads.parent := frmdesign;
loads.left := 0;
loads.top := 40;
loads.width := 257;
loads.height := 30;
loads.caption := 'Loads TO DO:';
edit1 := tedit.create(frmdesign);
edit1.parent := frmdesign;
edit1.left := 0;
edit1.top := 80;
edit1.width := 257;
edit1.height := 26;
edit1.font.color := clwindowtext;
edit1.font.height := 18;
edit1.font.name := '@batang';
edit1.font.style := [];
edit1.parentfont := false;
edit1.taborder := 8;
edit1.text := 'Click and type # of loads!';
Button1 := tbutton.create(frmdesign);
button1.parent := frmdesign;
button1.onclick := @buttonclick;
button1.left := 40;
button1.top := 144;
button1.width := 161;
button1.height := 97;
button1.caption := 'Start';
button1.taborder := 9;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmdesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SafeInitForm;
SafeShowFormModal;
repeat
cleardebug;
I := I + 1;
u := u + 28;
g := g + 17;
f := f + 1;
Writeln('Sink998'#39's Copperminer report');
Writeln('Script has been running ' + timerunning);
Writeln('You have done ' + IntToStr(I) + ' Loads');
Writeln('you have mined ' + IntToStr(u) + ' copper ore');
Writeln('you have erened ' + IntToStr(g) + ' expirience points note this is estimated add 14 expirience to every load to know accurate results');
Writeln('_________________________________________');
Writeln('| SINK |');
writeln(' \ 998 / ');
writeln('-----------------------------------------');
abc := strtoint(edit1.text)
until (f >= 0 + abc);
end.
please test out my form and tell em how iam going about it so far
There are currently 1 users browsing this thread. (0 members and 1 guests)