Page 1 of 1

C++ Exception(Solved)

PostPosted: Tue Sep 03, 2013 00:00
by jojoa1997
Hi so i redid my display blocks mod and when i tested it i only got for the error C++ exception in the init.lua.
Here is the repo https://github.com/jojoa1997/display_blocks
Btw here is the error. Duh i forgot to add it.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
20:01:18: ERROR[main]: ========== ERROR FROM LUA ===========
20:01:18: ERROR[main]: Failed to load and run script from
20:01:18: ERROR[main]: ~~~\Minetest\bin\..\mods\display_blocks\init.lua:
20:01:18: ERROR[main]: C++ exception
20:01:18: ERROR[main]: =======END OF ERROR FROM LUA ========

PostPosted: Tue Sep 03, 2013 00:40
by PilzAdam
These bugs are hard to hunt. Id guess it has something to do with metadata.
What code have you edited when the error appeared?

PostPosted: Tue Sep 03, 2013 00:47
by jojoa1997

PostPosted: Tue Sep 03, 2013 01:23
by PilzAdam

PostPosted: Tue Sep 03, 2013 01:45
by jojoa1997
ok so i tested what areas work and this is the last spot to print(""). i think it is the function but i dont know what is wrong with the function.
https://github.com/jojoa1997/display_blocks/blob/master/init.lua#L63

PostPosted: Tue Sep 03, 2013 02:00
by PilzAdam
The problem is that the 4th argument is passed as "replacements" to register_craft. It needs to be a table.
You simply forgot to update the 2 lines I linked above and these two lines: https://github.com/jojoa1997/display_blocks/blob/master/init.lua#L64

PostPosted: Tue Sep 03, 2013 02:12
by jojoa1997
PilzAdam wrote:The problem is that the 4th argument is passed as "replacements" to register_craft. It needs to be a table.
You simply forgot to update the 2 lines I linked above and these two lines: https://github.com/jojoa1997/display_blocks/blob/master/init.lua#L64
ah OK. Thanks. I should haveit fixed by tomorrow.

PostPosted: Tue Sep 03, 2013 10:55
by jojoa1997
OK problem solved. Pilzadam thanks for the help. Can someone close this topic.

PostPosted: Tue Sep 03, 2013 11:03
by PilzAdam
jojoa1997 wrote:Can someone close this topic.

Why closing this topic? Others may have further questions.

PostPosted: Tue Sep 03, 2013 11:19
by jojoa1997
PilzAdam wrote:
jojoa1997 wrote:Can someone close this topic.

Why closing this topic? Others may have further questions.
oh yeah your right. Also I haven't updated github yet so don't use it to see what my fix is