SRL Archive - Help and Support

Identifier Expected


Daniel

2008-04-14 06:58:12

Ok, this error has made me stumped. This is the error:
Line 6: [Error] (19:1): Identifier expected in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\misc/SMART.scar
and here is the part of the script that i just made which is obviously causing this error:
procedure SMART_Absence(SMART: Boolean);
begin
if(SMART) then
{$Define SMART}
{$ifDef SMART}
{.include SRL\SRL\misc/SMART.scar}
{$endIf}
{.include SRL/SRL.scar}
end;

But when i normally include SMART.scar, that error doesn't come up. Why?

Thanks for reading and hopefully helping :D :p

Bobarkinator

2008-04-14 08:17:36

If I remember right, you can't declare an include in a procedure
But I can't remember so you can test

Edit: Just tested and you can't declare in the middle of a procedure or function. (Unless I have bad coding and the error came from somewhere else :p)

mixster

2008-04-14 08:17:45

just add something in the if()then as the code is all the {$IFDEF} and {.include} etc. and isn't "counted as code" so just something like i:= i; or something like that in the if then with a begin and end and it *should* work:)