SRL Archive - OSR Help

Creating form?


maikel233

2013-04-25 18:31:07

Hey Villavu, i'm trying to add an Form for my woodcutting script, but when its starts its just terminate the script?

Could anyone take look at it Thanks

@ file is in the attachment.

- Maikel233.

Neznam

2013-04-25 18:43:13

It would be better to post it in Code tags

  Here 
<without spaces

Olly

2013-04-25 18:47:23

you can't have two "main begins and ends"

begin
SafeInitForm; // those 2 function are the action form setup. Thise one creates your form
SafeShowFormModal; // and this one makes it visible
end.

will call that and nothing else.

why not do

procedure showForm();
begin
SafeInitForm; // those 2 function are the action form setup. Thise one creates your form
SafeShowFormModal; // and this one makes it visible
end;

maikel233

2013-04-26 03:06:29

From: Ollybest
you can't have two "main begins and ends"

begin
SafeInitForm; // those 2 function are the action form setup. Thise one creates your form
SafeShowFormModal; // and this one makes it visible
end.

will call that and nothing else.

why not do

procedure showForm();
begin
SafeInitForm; // those 2 function are the action form setup. Thise one creates your form
SafeShowFormModal; // and this one makes it visible
end;


Thanks for the reply but it still gives an error, Sucks that simba cant say line: …. is the problem…

Chris!

2013-04-26 03:19:54

From: maikel233
Thanks for the reply but it still gives an error, Sucks that simba cant say line: …. is the problem…


Don't just tell us you got an error! Tell us what it was!

After creating the procedure Olly showed you, did you then call it in your mainloop?

maikel233

2013-04-26 03:30:17

From: Chris!
Don't just tell us you got an error! Tell us what it was!

After creating the procedure Olly showed you, did you then call it in your mainloop?


Yes of course: Simba says that the player info is incorrect now.

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(1);
CurrentPlayer := 0;

// PLAYER INFO, TIP Your RS Username, Password, Pin IS NOT REQUIRED SIMPLY DISABLE SMART when Runescape Loads.
// Wielding_Axe:= False;
wielding_axe :=Checkbox1.checked;
Players[0].Name :=Edits[0].text;
Players[0].Pass :=Edits[1].text;
Players[0].Nick :=Edits[2].text;
Players[0].Pin :=Edits[3].text;
Players[0].Active:=True;
Players[0].LampSkill:= skill_woodcutting;


SetScreenName(Players[0].Nick);
end;

Chris!

2013-04-26 03:37:20

If you're getting the "Identifier Expected" error, then at lines 141->143 you have close your procedure using end;!

Remember, whenever you have a begin, it must have an end;!

So just add three end;'s on lines 141, 142 and 143 and it compiles for me.

maikel233

2013-04-26 03:48:57

From: Chris!
If you're getting the "Identifier Expected" error, then at lines 141->143 you have close your procedure using end;!

Remember, whenever you have a begin, it must have an end;!

So just add three end;'s on lines 141, 142 and 143 and it compiles for me.


So i redownloaded this script for my laptop, Added three ends and works fine… Thanks Criss, Ollybest!!!!!