Log In  

Just going to start a thread here for bugs in the text as they're found so we can keep them all in one place.

P#65596 2019-07-05 12:13 ( Edited 2019-07-09 19:00)

In the section Actors it incorrectly explains the Lua colon syntax

Actor state, attributes, modifiers and inventory functions all take the
actor as the first parameter, and so can be called using Lua's ':' operator:

x,y,z = foo:get_xyz()

-- means the same as:
x,y,z = get_xyz(foo)

which should be:

x,y,z = foo:get_xyz()

-- means the same as:
x,y,z = foo.get_xyz(foo)

It's a sugar for methods/functions that are properties of tables, not for regular functions not associated with a table.

P#65597 2019-07-05 12:18

Am I correct to say that there is an implicit `this` reference that gets passed into scripts on actors? I was poking around is Molly's object as saw that in the scripts. Would be nice if that was mentioned in the docs.

P#65728 2019-07-09 18:54 ( Edited 2019-07-09 18:56)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-02 03:19:25 | 0.005s | Q:7