Skip to content

Use localplayer to avoid crash#1

Open
Montandalar wants to merge 2 commits into
ChimneySwift:masterfrom
Montandalar:master
Open

Use localplayer to avoid crash#1
Montandalar wants to merge 2 commits into
ChimneySwift:masterfrom
Montandalar:master

Conversation

@Montandalar
Copy link
Copy Markdown

Under 5.5.0-dev, my client crashes back to the main menu with this stack trace:

Access denied. Reason: Lua: Runtime error from mod '' in callback on_item_use(): toolbuddy:init.lua:77: attempt to call field 'get_wielded_item' (a nil value)
stack traceback:
	toolbuddy:init.lua:77: in function 'checkTool'
	toolbuddy:init.lua:69: in function '?'
	*builtin*:client/register.lua:26: in function <*builtin*:client/register.lua:14>

Since minetest/1292bdbbcec45613c95aff9f2ea88aa49af25011, you need to use minetest.localplayer to call get_wielded_item as it was changed from a method on the minetest object to a method on the LocalPlayer userdata. This PR will update the CSM for 5.3 but would break backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant