SRL Archive - General Botting Help

New to Simba. god dam colon?


ibrycei

2014-01-09 21:01:59

hey i was just wondering if someone could correct me ive been having this problem trying to work out why it wants a colon?

Im new to scripting ive done abit of scar a couple of years ago everything i wanted to bot worked out fine though.

[Error] C:\Simba\Scripts\lol.simba(6:19): colon (':') expected at line 6
Compiling failed.


program farm;



function find_plot;
begin
end;

procedure clear_plot;
begin
end;

procedure open_inventory;
begin
end;

procedure Place_seed;
begin
end;

procedure close_inventory;
begin
end;

procedure harvest_plot;
begin
end;

begin
if find_plot; then

clear_plot;
open_inventory;
place_seed;
close_inventory;
harvest_plot;

end.



Shouldnt it just run though all the function/procedures and then end?

Sjoe

2014-01-09 21:17:19


function find_plot;
begin
end;

functions returns result, example boolean (true or false)


function find_plot: boolean;
begin
end;

better explanation here: http://villavu.com/forum/showthread.php?t=58935

Kasi

2014-01-09 21:17:28

Functions need to return a type.

Function ReturnInteger : Integer;
begin

end;

Function ReturnBoolean : Boolean;
begin

end;

etc
etc.


Edit: fvcking @Sjoe; :ninja:

ibrycei

2014-01-09 21:20:47

Thank you very much works fine now!