nunye
09-15-2016, 11:55 AM
Sorry to be a bother, but I have another question (been gone a long time, so bear with me please?) My code was borrowed from someone else; I'm still trying to remember (and learn!) what exactly it all means, but I'm usually good at understanding it very basically. I really appreciate any help anyone wants to give.
I have a script the sells gems based on a user defined monetary value. It worked fine before I left but now it gives me this:
--- Lich: error: undefined method `GameObj' for #<Array:0xc62c718>
gemvaluemine:34:in `script'
C:/Users/Me/Desktop/lich/lich.rbw:2533:in `eval'
The code in question is:
gem = ["this", "that", "the other"]
fput "open my #{Lich.tipsack}"
fput "open my #{Lich.gemsack}"
result = dothistimeout "look in my #{Lich.gemsack}", 5, /In the .*? you see/
contents = result.scan(/\b(?:#{gem.join('|')})(?= and an? |,|\.)/)
contents.GameObj.loot.each { |gem|
fput "get #{gem} from my #{Lich.gemsack}"
}
I have a script the sells gems based on a user defined monetary value. It worked fine before I left but now it gives me this:
--- Lich: error: undefined method `GameObj' for #<Array:0xc62c718>
gemvaluemine:34:in `script'
C:/Users/Me/Desktop/lich/lich.rbw:2533:in `eval'
The code in question is:
gem = ["this", "that", "the other"]
fput "open my #{Lich.tipsack}"
fput "open my #{Lich.gemsack}"
result = dothistimeout "look in my #{Lich.gemsack}", 5, /In the .*? you see/
contents = result.scan(/\b(?:#{gem.join('|')})(?= and an? |,|\.)/)
contents.GameObj.loot.each { |gem|
fput "get #{gem} from my #{Lich.gemsack}"
}