Send Redis commands with a float from Lua

365 views
Skip to first unread message

Nicolas Fouché

unread,
May 12, 2012, 1:20:20 PM5/12/12
to redi...@googlegroups.com
hello bros.

Anyone knows how to send the HINCRBYFLOAT command with Lua. I get this error: "Lua redis() command arguments must be strings or integers".

tostring does not help. Something seems to autocast my string to a float.

local a = 2.1
redis.call('hincrbyfloat', 'lol, 'total', a) # => "Lua redis() command arguments must be strings or integers".
redis.call('hincrbyfloat', 'lol, 'total', tostring(a)) # => "Lua redis() command arguments must be strings or integers".

Thanks

Nicolas Fouché

unread,
May 12, 2012, 2:03:18 PM5/12/12
to redi...@googlegroups.com
My bad, the error was not on this command. I tried to Publish an array in a channel.
Reply all
Reply to author
Forward
0 new messages