Jump to content
BryceTheCoder

How to make an Int equal an amount and change the amount?

Recommended Posts

EDIT: I get an error on this line:

ready := 0

 

saying:

is ('=') expected

 

 

HERE IS MY CODE I HAVE:

 

const
ready := 0


procedure StartUp;
begin

if (ready = 0) then
begin
WriteLn('--------------------------------------------------------------');
WriteLn('');
WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
WriteLn('');
WriteLn('Always make sure you have the latest version:)');
WriteLn('');
WriteLn('--------------------------------------------------------------');
ready := 1;
end;

 ClickCompass(True);
 Wait(200 + Random(500));
end;

Edited by BryceTheCoder
Link to comment
Share on other sites

ready is a constant.

 

Constants work like this:

 

ready = 0;

 

..but...

As it is a constant, it cannot be changed within script runtime.. So you get an Internal error.

To solve your problem, you will need to use VARIABLE for it.

 

Like:

 

var
 ready: Integer;


procedure StartUp;
begin
 if(ready = 0)then
 begin
   WriteLn('--------------------------------------------------------------');
   WriteLn('');
   WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
   WriteLn('');
   WriteLn('Always make sure you have the latest version:)');
   WriteLn('');
   WriteLn('--------------------------------------------------------------');
   ready:= 1;
 end;
 ClickCompass(True);
 Wait(200 + Random(500));
end;

Edited by Janilabo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...