PDA

View Full Version : Error: Operator expected on old script



Chryma
12-18-2016, 01:03 PM
I've just gone through and installed Simba/SRL, I used to use it back when OSR came back, I have a script from back then I'd like to use but when I attempt to compile I get that error. The line it hangs on is
ClickMouse2(mouse_left); it also has
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba} at the start. I'm wondering if there's something I'm missing or if because it's so old there's something I might need to update to get it to function? Thanks.

riwu
12-18-2016, 01:49 PM
Nothing wrong with that line.
What's the line before that? Probably a missing semicolon.

Chryma
12-19-2016, 12:30 AM
Wow, you're right. I'm getting another error now though
Error: Can't assign "Extended" to "Int32" at line 155 this is the chunk of code it points to: http://pastebin.com/npJ7AnSQ, specifically, the line
row := (((i-1)/9)+1); All my variables are integers. I've tried changing rows to Extended which works but gives me other errors where the row variable needs to be an integer.

riwu
12-19-2016, 02:09 AM
Wow, you're right. I'm getting another error now though
Error: Can't assign "Extended" to "Int32" at line 155 this is the chunk of code it points to: http://pastebin.com/npJ7AnSQ, specifically, the line
row := (((i-1)/9)+1); All my variables are integers. I've tried changing rows to Extended which works but gives me other errors where the row variable needs to be an integer.
Your script is written with PascalScript. In Lape '/' is float division even when operands are integers.
Change "(((i-1)/9)+1)" to "(((i-1) DIV 9)+1)"

Or maybe just change script -> intepreter to PascalScript?

Chryma
12-19-2016, 02:37 AM
Changing it to PascalScript fixed it completely, thanks!