## C++ Exception(Solved)

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

### C++ Exception(Solved)

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.
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++ exception20:01:18: ERROR[main]: =======END OF ERROR FROM LUA ========`
Last edited by jojoa1997 on Tue Sep 03, 2013 10:55, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right

Member

Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
These bugs are hard to hunt. Id guess it has something to do with metadata.
What code have you edited when the error appeared?

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth
Coding;
1X coding
3X debugging
12X tweaking to be just right

Member

Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth
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
Coding;
1X coding
3X debugging
12X tweaking to be just right

Member

Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
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

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth
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.
Coding;
1X coding
3X debugging
12X tweaking to be just right

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth
OK problem solved. Pilzadam thanks for the help. Can someone close this topic.
Coding;
1X coding
3X debugging
12X tweaking to be just right

Member

Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
jojoa1997 wrote:Can someone close this topic.

Why closing this topic? Others may have further questions.

jojoa1997
Member

Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth
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
Coding;
1X coding
3X debugging
12X tweaking to be just right