Log in

View Full Version : My First Script - Errors?



jbrauman
06-22-2007, 02:39 AM
Hey all, I'm new. And this is my first script ;)


program AutoTyperTrader;
/////////////////////////////////////////////
// Types a designated message until //
// someone tries to trade with you, then //
// accepts the trade and exits the //
// script. //
/////////////////////////////////////////////
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/trade.scar}

const SellingMessage = 'Flash1:Wave2:Selling 4k ess 30ea!! -- Chicken Kllr';

procedure FoundTrade;
begin
If SomeoneTrades Then //Someone tries to trade with you.
begin
AcceptTrade; //Accepts the trade.
Exit; //Exits The Script.
end;
end;

procedure Talk(MessageToSay:String; //Like TypeSend, but waits a random
//time before typing. Also I like
//using the word 'talk' better. :)
begin
Wait(2000 + random(1000));
TypeSend(MessageToSay);
end;

begin
if (Not LoggedIn) then Exit; //Exits it not logged in.
repeat
if SomeoneTrades Then FoundTrade; //If someones trying to trade, do
//the procedure.
Wait(1000 + random(2000); //Waits a little before typing..
Talk(SellingMessage);
until(False);
end.


But I'm getting errors?
Please, I need your help!

-jbrauman (h)

jbrauman
06-22-2007, 04:04 AM
Bump.

Santa_Clause
06-22-2007, 04:06 AM
You have:
If SomeoneTrades

Scar doesn't know what SomeoneTrades is..you have to make a procedure/function

jbrauman
06-22-2007, 04:12 AM
Isn't SomeoneTrades in {.include SRL/SRL/misc/trade.scar} this?

Santa_Clause
06-22-2007, 04:13 AM
Meh..I'll look again...script is messy so I'll format for you...

Ramage
06-22-2007, 04:32 AM
procedure Talk(MessageToSay:String;
Change it into a function and add a close bracket.

jbrauman
06-22-2007, 04:39 AM
Thanks Guys.

-jbrauman