2
votes

I wanted to test out Lua scripting with Redis but I keep getting error messages for the simplest commands.

Here is a screenshot:

enter image description here

Why does this simple command say that I don't provide enough arguments?

1
It would help to know what version of Redis you are using. - Paul Kulchenko
I am using Redis 3.2.11. The error dissappeared for some reason. Don't know why. - Alex
The code in your screenshot is missing is comma (',') between the last two arguments (0 and -1) given to ZRANGE - Itamar Haber
That is true, thank you! - Alex
Itamar Haber I watched your video on youtube, thank you so much for the tutorial. By the way do you know why the Stack window is empty when I debug? I posted the problem in another post. - Alex

1 Answers

1
votes

I don't see any error running this code on a pre-release of v3.2:

redis.call("ZADD", "user", 1, "one")
return redis.call("ZRANGE", "user", 0, -1)

I get one printed to the Output window. I do get the same error if I skip one of the parameters in ZADD or ZRANGE calls, for example when trying to run redis.call("ZADD", "user", 1).