This is a tutorial for those who get errors while trying to compile your own script not run someone elses. For errors when trying to run another script go to: So, you get an error huh?, the FAQ or the script related thread.
Without further adieu:
- Operator expected at line xx, column xx or Invalid evaluation at line xx, column xx
This means on the above line, you forgot to put a semicolon ; at the end of it
---- Expression expected at line xx, column xx
It's cause by not having enough end; meaning you the number of begins and ends in your procedure/function do match up - there needs to be an equal number. Also note that a case needs and end; too.
---- Unknown declaration '' at line xx, column xx
There are various reasons why this are caused.
Firstly, it may be because you have an undeclared variable. By this I mean you want a word to represent a value and you use it, such as:
You need to tell the script what 'Logs' represent, to do this you have to declare it as a variables, so:Simba Code:procedure logs();
begin
Logs := 2;
end;
Simba Code:procedure logs();
var
Logs: Integer; // declared here as an integer, which a whole number
begin
Logs := 2;
end;
Another reason it because you may have misspelled a function, such as spelling writeLn as writeIn <- with an 'i', which means that Simba has no idea what the function is supposed to mean
The final reason you may have got this error is because you forgot to include Simba, make sure you have this after you define smart:
Simba Code:{$i srl-6/srl.simba}
And this in your mainloop:
Simba Code:setupSRL(); // put before your functions
---- Invalid label at line xx, cloumn xx
This means, when writing the equals sign in simba, you put the colon but forgot to put the actual equals sign. It should:
---Simba Code:i := 2; //look like this
i :2; // not this- Duplicate declaration '' at line xx, column xx
There are a few reason why this may occur.
The first is because you have made two procedures/functions with the same name, this can be used by utilising the overload and override options shown here.
The second is because you have made a procedure/function with a name that already exists in the SRL Include.
The third is because you named a variable the same as a procedure or function that already exists in the SRL Include.
---- No default value for parameter '' found at line xx, column xx
This means, when using a function/procedure you have not put the right (amount of) values within the brackets. This is either because you just haven't, or you missed out a comma/ put an extra one.
---- Closing parenthesis expected at line xx, column xx or Found closing parenthesis without matching opening parenthesis at line xx, column xx
Simple means you have forgotten to put a closing bracket ) at that line, go to the line and put in the bracket or remove the extra bracket if that is the problem.
---- Expected variable of type "", got "" at line xx, column xx at line xx, column xx
The most common reason this error occurs is because you have entered a value wrong within the brackets for a function.
For example you have written an integer (number) when there should be a string (word). Or if you have declared something as a string or integer when it should have been the other way round.
---
So yeh there is a list of the most common errors people seem to be getting when trying to make scripts, hopefully this will help you on your way!
If you want any common errors to be added to this list let me know. Also, be sure to point out any reason I may not have mentioned for errors
Like, comment and subscribe *lool*