Undeclared global variable "name" accessed in mcl_mobspawners/init.lua #3559

Closed
opened 2023-03-19 03:28:24 +01:00 by kneekoo · 1 comment
Contributor

This happened while testing PR #3551, although it doesn't seem to have anything to do with it.

WARNING[Emerge-0]: Undeclared global variable "name" accessed at ...est/games/mineclone2/mods/ITEMS/mcl_mobspawners/init.lua:320
This happened while testing PR #3551, although it doesn't seem to have anything to do with it. ``` WARNING[Emerge-0]: Undeclared global variable "name" accessed at ...est/games/mineclone2/mods/ITEMS/mcl_mobspawners/init.lua:320 ```
kneekoo added the
bug
unconfirmed
mobs
labels 2023-03-19 03:28:33 +01:00
kneekoo added the
code quality
label 2023-03-19 03:32:41 +01:00
Member

Just looking through things a little:

ln 294: local name = placer:get_player_name()
ln 320-323: if not minetest.is_creative_enabled(name) then
			mcl_experience.throw_xp(pos, math.random(15, 43))
				end
			end,

According to mcl_experience/init.lua, theres an extremely similar variable

ln 116: local name = player:get_player_name()

I think 'placer' is a typo and should instead be 'player'

Just looking through things a little: ``` ln 294: local name = placer:get_player_name() ``` ``` ln 320-323: if not minetest.is_creative_enabled(name) then mcl_experience.throw_xp(pos, math.random(15, 43)) end end, ``` According to mcl_experience/init.lua, theres an extremely similar variable ``` ln 116: local name = player:get_player_name() ``` I think 'placer' is a typo and should instead be 'player'
ancientmarinerdev self-assigned this 2023-03-20 00:37:00 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#3559
No description provided.