1
Software / Need Help with pascal programming in scar
« on: June 13, 2007, 02:40:47 PM »
I am working on a macro that will mine coal in runescape. I have already mapped out the structure of the program, but when i got to one part, i am completely lost at what to do.
I keep getting an error during compilation, and i dont know whats wrong. This is the section of code with the problem.
45 //Function to check if inventory is full
46 Function CheckInventory(): boolean;
47 //initialize local variable for function
48 var inventoryState: boolean;
49 begin
50 inventoryState:= true;
51 CheckInventory:= inventoryState;
52 end;
The Problem comes in at the line CheckInventory:= inventoryState;.
The compiler says "identifier expected at line 51"
but checkInventory is an identifier for that function, meaning it should set the return value equal to inventoryState right. What am I doing wrong. Also excuse any format or name styles that may be a little akward for pascal as I am a java programmer, and these are my first attempts at pascal. Also note that those numbers along the side are there for reference to the line and are not written in the actual program.
attached is a full copy of the script in case there is any question about other areas that may affect it.
I keep getting an error during compilation, and i dont know whats wrong. This is the section of code with the problem.
45 //Function to check if inventory is full
46 Function CheckInventory(): boolean;
47 //initialize local variable for function
48 var inventoryState: boolean;
49 begin
50 inventoryState:= true;
51 CheckInventory:= inventoryState;
52 end;
The Problem comes in at the line CheckInventory:= inventoryState;.
The compiler says "identifier expected at line 51"
but checkInventory is an identifier for that function, meaning it should set the return value equal to inventoryState right. What am I doing wrong. Also excuse any format or name styles that may be a little akward for pascal as I am a java programmer, and these are my first attempts at pascal. Also note that those numbers along the side are there for reference to the line and are not written in the actual program.
attached is a full copy of the script in case there is any question about other areas that may affect it.