Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect object:_field() usage docs #4020

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

vallode
Copy link
Contributor

@vallode vallode commented Nov 14, 2023

Looks like ref.field(name) was not documented properly.

static int meta_struct_field_reference(lua_State *state)
{
    if (lua_gettop(state) != 2)
        luaL_error(state, "Usage: object._field(name)");

Both the struct and container versions require self (in Lua terms). Running either with the provided syntax results in an error prompting Usage: object._field(index) which is also incorrect.

@myk002 myk002 merged commit affcc8b into DFHack:develop Nov 14, 2023
12 checks passed
@vallode vallode deleted the fix-_field-docs branch November 14, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants