loader.lua does not like forward slashes

Apparently openluup does not like forward slashes inside variables.

loader.lua complains about being unable to concat when a “/” is part of a string inside a variable. (Line 283) while loading a plugin

local source_code = table.concat (loadList, '\n')             -- concatenate the code

I had to insert the value in decimal and convert to character in order to bypass the complaining…

local slash = string.char("47")
local end_request = "<" ..slash.. "IRCCCode><" ..slash.. "u:X_SendIRCC><" ..slash.. "s:Body><"..slash.. "s:Envelope>"

wondering if anyone else has experience something similar?

Hi,

The forward slash is a special character so you need to use the escape character. I.e. when you want to use / put / in the string and it should work. For some reason Vera LUA does not complain about it, but most other LUA implementations probably will. I know the one on a PI does :slight_smile:

Cheers Rene

Thanks for the head up … Although I did try your suggestion before the Hex conversion but for some reason it did not like escaping the “/” with a "" … it was weird though…