C++ Exception(Solved)

Post Reply
User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

C++ Exception(Solved)

by jojoa1997 » Post

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++ exception
20: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

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

These bugs are hard to hunt. Id guess it has something to do with metadata.
What code have you edited when the error appeared?

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

this is the code that was changed when things turned sour. https://github.com/jojoa1997/display_bl ... 7353ab8bc5
Coding;
1X coding
3X debugging
12X tweaking to be just right


User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

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_bl ... it.lua#L63
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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_bl ... it.lua#L64

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

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_bl ... it.lua#L64
ah OK. Thanks. I should haveit fixed by tomorrow.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

OK problem solved. Pilzadam thanks for the help. Can someone close this topic.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

jojoa1997 wrote:Can someone close this topic.
Why closing this topic? Others may have further questions.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

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
Coding;
1X coding
3X debugging
12X tweaking to be just right

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests