SRL Archive - Help and Support

Line 1347: [Error] (29702:5): Identifier expected in script


Waddo

2009-06-21 03:45:31

Line 1347: [Error] (29702:5): Identifier expected in script


http://nathan.pastebin.com/m6bb71a79

Please help me :( rep for any one who helps :)

Method

2009-06-21 03:50:33

If you want to have more than one statement included in the "else" clause, you need to have the code encapsulated in a begin and end. Add the begin before "Wait(2000);" on line 1346 and the end after "antirandoms;" and you'll hopefully get rid of that error.

EDIT: I didn't see the while loop, see below for a solution.

Simtoon

2009-06-21 04:13:32


If you want to have more than one statement included in the "else" clause, you need to have the code encapsulated in a begin and end. Add the begin before "Wait(2000);" on line 1346 and the end after "antirandoms;" and you'll hopefully get rid of that error.


I helped :)

Da 0wner

2009-06-21 04:20:50

Omfg, that is terrible spam Simtoon. Reported the post. If what method said does not correct your problem, I will be happy to help once I get on the computer.

Waddo

2009-06-21 04:30:22

The aforementioned solution did not resolve the issue and I would be very grateful if you where to offer your assistance.

/there ya go R0b0t you happy if I talk like dat

Da 0wner

2009-06-21 04:41:37

You cannot use else in a while statement.

Example:
program New;

var
Bool : boolean;

begin
if Bool then
Writeln('Bool is true...')
else
Writeln('Bool is false...');
end.
No error, right?

Now try this:
program New;

var
Bool : boolean;

begin
While Bool do
Writeln('Bool is true...')
else
Writeln('Bool is false...');
end.
Identifier expected ;).

Waddo

2009-06-21 05:00:03

humpf I asked that in irc can a while do have end else and they all said yes :/

Da 0wner

2009-06-21 05:10:06

Well then, they do not know what they are talking about :D.

senrath

2009-06-21 05:19:01

Why would you need an else with a while..do anyway? Anything that comes after it is already essentially in an else block, as it only advances past the while..do block once the while statement proves false.