I think I have a good one for all the lua code experts. I'm getting the following error when Micromacro tries to cast the Rogue/Knight elite spell "Lion's Protection" using the built in RoMScript function and the spell never casts.
[string "r=" a={CastSpellByName('Lion's Protection');} for i=1,#a do r=..."]:1: ')' expected near 's'
I think it's tripping up on the apostrophe in the word Lion's hence it's looking for a closing parentheses near the "s" in Lion's. The code that looks like it might be be causing the issue is found in skills.lua, line 411 which is using the built in RoMScript function found in functions.lua, line 525.
I wish I new enough about lua coding to figure out how to change the RoMScript function to be able to handle spells with apostrophes in them. Any ideas?
Error when using RoMScript() to cast Lion's Protection
- Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Error when using RoMScript() to cast Lion's Protection
It is from your use of single quotes. Either escape the single quote in Lion's Protection, or change the outer single quotes to double quotes.
Re: Error when using RoMScript() to cast Lion's Protection
Well I tried both suggestions and they both worked. I guess I feel more comfortable escape sequencing the single quote in Lion's Protection. Thanks Admin 

Who is online
Users browsing this forum: No registered users and 1 guest