문제

Could someone give an example of how to load and execute .lua script files in windows. I am using ServiceStack redis to loadluascript. It works to certain scripts which don't have module(...) like things.

I am getting this error

Error compiling script (new function): user_script:5: cannot use '...' outside a 
vararg function near '...' , sPort: 61688, LastCommand:

Any help by giving an example would be highly appreciated.

Thanks in advance

도움이 되었습니까?

해결책 2

The solution for the above kind Lua script is to prepend local before a function or all variables. I took out the module thing and tweaked the Lua script to make it work. Later I realized the script will not be any use to me :). Thanks for looking into this post.

다른 팁

It would help if you posted the Lua script you are trying to load or execute.

Three dots don't have anything to do with modules:

Vararg expressions, denoted by three dots ('...'), can only be used 
when directly inside a vararg function

I guess this answers your question: your Lua code is simply invalid.

Speaking of modules: you can't load your own modules in Redis Lua, which you might already know. See http://redis.io Scripting.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top