Log in

View Full Version : Probably noob question: why doesnt compile this?



lollage22
07-07-2010, 08:43 PM
program AFK_warner;

{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/SMART.scar}

function NeedToEat:Boolean;

function GettingXP:Boolean;


begin
repeat
wait(1000);
if (NeedToEat or (not GettingXP) ) then
PlaySound('C:\WINDOWS\Media\tada.wav');
until (GetTimeRunning>(120*60*1000));
end.


[Error] C:\Simba\Includes\SRL/SRL/Misc/SMART.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
Compiling failed.

I'm trying simba for the time being. Love it! However, why doesn't this compile? Something with SMART, SetUpSRL, DeclarePlayers?

Thanks in advance! Cheers.

Coh3n
07-07-2010, 08:46 PM
You have to include SMART before SRL. You'll also need begin/ends in your functions.

{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}

function NeedToEat:Boolean;
begin
end;

function GettingXP:Boolean;
begin
end;

begin
repeat
wait(1000);
if (NeedToEat or (not GettingXP) ) then
PlaySound('C:\WINDOWS\Media\tada.wav');
until (GetTimeRunning>(120*60*1000));
end.

lollage22
07-07-2010, 09:03 PM
As I said, noob question. Thanks! :P

Coh3n
07-07-2010, 09:04 PM
As I said, noob question. Thanks! :P
Believe me, I've had my share. ;)