PDA

View Full Version : Changes



nunye
09-09-2016, 01:53 PM
Hey.

I've been on hiatus for a couple of years and I came back to find some of the scripts I've written have issues. As an example:

--- Lich: error: sell:366: syntax error, unexpected ( arg, expecting keyword_then or ';' or '\n'
if alchemy.include? (item.name) || alchemy.include? (item.noun)
^
C:/Users/Me/Desktop/lich/lich.rbw:2489:in `eval'
C:/Users/Me/Desktop/lich/lich.rbw:2489:in `block (2 levels) in <class:Script>'


Is there a way to find out how to fix some of the errors I'm running across? I'm not a coder but I'm decent at figuring things out by example. Any help?

Maerit
09-09-2016, 05:42 PM
Take the spaces out between the .include? (item.name) on both sides of the ||

if alchemy.include?(item.name) || alchemy.include?(item.noun)

I think that will fix the error. It didn't make it past this line, and you're likely to see more of these errors in scripts. I found that the newer version of lich did not like the spaces between .<eval>? (argument) statements that I had in older scripts like when I had a dozen or more scripts fail after upgrading lich that used to state:

wait_while {running? ("go2")} - that space broke the script.

nunye
09-09-2016, 10:10 PM
Thanks, worked like a charm.