I have a medium complexity LUA script which i have tested via the redis-cli. Using:
EVALSHA sha1 numkeys key1..keyn arg1..arg2
My script takes 2 arguments, no keys.
I'm loading the script on the .NET side from a text file into string luaString
, then using
LuaScript lua = LuaScript.Prepare(luaString)
to create the LuaScript object. So far so good?
Now i create:
object luaParams = new { '1923920', '{ "type":"message", "property1":"this is an example" }' };
RedisResult r = lua.Evaluate(IDatabase, luaParams);
Throws exception:
Additional information: ERR Error running script (call to f_a14d7a96f7556c52775eb277db66dfe0bfadd6a5): @user_script:37: @user_script: 37: Lua redis() command arguments must be strings or integers
I've looked at the github scripting.md but its example doesn't seem to address my scenario, or I am just not "getting" something.
What am I missing? I've tried quoted and unquoted luaParams, adding a 0 for no keys.