Compiler doesn't recognize identifiers?

EQWatcher Evolution discussion

Moderators: Lavish Software Team, Moderators

Post Reply
spointman
Non-Subscriber
Posts: 8
Joined: Sat Jul 24, 2004 5:40 pm

Compiler doesn't recognize identifiers?

Post by spointman » Sun Sep 16, 2007 3:11 pm

Sample script:

Code: Select all

function main() {}

function DoStuff()
{
	identifier LogFile 0;
	Create(LogFile, "log.txt");

	// Do whatever with the file here

	Close(LogFile);
}
When I compile, the compiler says:
C:\Games\EQWatcher Advanced>eqwesc id-test.eas id-test.eac
EQWESC EQWatcher Evolution Script Compiler v1.16 (compiled Wed Sep 17 19:19:02 2
003)
Input: C:\Games\EQWatcher Advanced\id-test.eas
Output: C:\Games\EQWatcher Advanced\id-test.eac
EQWatcher Directory:
Processed 2 globals
identifier LogFile 0;
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 5):
Unrecognized execution-level symbol 'identifier' of type unknown
Create(LogFile, "log.txt");
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 6):
Unrecognized execution-level symbol 'LogFile' of type unknown
Create(LogFile, "log.txt");
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 6):
Could not evaluate parameter 1
Create(LogFile, "log.txt");
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 6):
Function call without parameters
Close(LogFile);
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 10):
Unrecognized execution-level symbol 'LogFile' of type unknown
Close(LogFile);
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 10):
Could not evaluate parameter 1
Close(LogFile);
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 10):
Function call without parameters
Please fix errors

<Press any key.>
The first error says the compiler doesn't recognize the word "identifier", and the rest of the errors all basically mean that the identifier "LogFile" wasn't defined.

Thinking that maybe identifiers have to be top-level, I tried:

Code: Select all

function main&#40;&#41; &#123;&#125;

identifier LogFile 0;

function DoStuff&#40;&#41;
&#123;
	Create&#40;LogFile, "log.txt"&#41;;

	// Do whatever with the file here

	Close&#40;LogFile&#41;;
&#125;
That failed too:
C:\Games\EQWatcher Advanced>eqwesc id-test.eas id-test.eac
EQWESC EQWatcher Evolution Script Compiler v1.16 (compiled Wed Sep 17 19:19:02 2
003)
Input: C:\Games\EQWatcher Advanced\id-test.eas
Output: C:\Games\EQWatcher Advanced\id-test.eac
EQWatcher Directory:
identifier LogFile 0;
Error in C:\Games\EQWatcher Advanced\id-test.eas (line 3):
Invalid top-level statement
Processed 3 globals
Please fix errors
I also tried moving the identifier statement to the main() function, but got basically the same error as the first example above.

Any ideas?

Post Reply