Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 752

Lua Scripting • Calling table-based functions via inline Lua: not possible? (namespaces, etc)

$
0
0
It seems you can't use dots in names of lua functions. Foo.Txt is not a valid function name. Use FooTxt:

Skin:

Code:

[String]...Text=[&S:FooTxt('Hello')]...
Script file:

Code:

Foo = {}FooTxt = function(str)    return strend
This is because in Lua the foo.bar format is a shortcut (syntactic sugar) for a string index "bar" to a table "foo".

Statistics: Posted by jsmorley — Yesterday, 7:25 pm — Replies 2 — Views 150



Viewing all articles
Browse latest Browse all 752

Trending Articles