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

Use of string instead of tostring #44

Open
Watilin opened this issue Oct 13, 2023 · 0 comments
Open

Use of string instead of tostring #44

Watilin opened this issue Oct 13, 2023 · 0 comments

Comments

@Watilin
Copy link

Watilin commented Oct 13, 2023

I encountered a crash while playing Mesecraft.

2023-10-13 22:28:41: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'df_caverns' in callback environment_OnGenerated(): ...esecraft\mods\MODULES\dfcaverns\df_trees/tunnel_tube.lua:444: attempt to call global 'string' (a table value)
2023-10-13 22:28:41: ERROR[Main]: stack traceback:
2023-10-13 22:28:41: ERROR[Main]: 	...esecraft\mods\MODULES\dfcaverns\df_trees/tunnel_tube.lua:444: in function 'spawn_tunnel_tube_vm'
2023-10-13 22:28:41: ERROR[Main]: 	...s\mesecraft\mods\MODULES\dfcaverns\df_caverns/level2.lua:137: in function 'tunnel_tube_cavern_floor'
2023-10-13 22:28:41: ERROR[Main]: 	...s\mesecraft\mods\MODULES\dfcaverns\df_caverns/level2.lua:213: in function 'decorate'
2023-10-13 22:28:41: ERROR[Main]: 	...mes\mesecraft\mods\MODULES\dfcaverns\subterrane\init.lua:589: in function <...mes\mesecraft\mods\MODULES\dfcaverns\subterrane\init.lua:357>
2023-10-13 22:28:41: ERROR[Main]: 	...es\minetest-5.7.0-win64\bin\..\builtin\game\register.lua:446: in function <...es\minetest-5.7.0-win64\bin\..\builtin\game\register.lua:432>

https://github.com/FaceDeer/dfcaverns/blob/2f2577eada556f8b85528afa14af72efafd16c29/df_trees/tunnel_tube.lua#L444C79-L444C79
The culprit seems to be a use of string() instead of tostring(), but fixing it won't be enough, we need to know how we got in the condition pattern == nil. I'm investigating.

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

No branches or pull requests

1 participant