1
local a = {}

for i,v in ipairs(KEYS) do
    a[i] = redis.call('hgetall',v)
end

return a

Above is my script

eval test.lua 3 user:1 user:2 user:3 0  
(error) ERR Error compiling script (new function): user_script:2: '=' expected near 'end'

Above is my redis command and error
Can anyone tell why the error happened and show me how to write a correct command?

1 Answer 1

3

The [EVAL command] (https://redis.io/commands/eval) expects the first argument to be the actual script, not a filename. Fix that and it should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.