C++ Exception(Solved)

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

C++ Exception(Solved)

by jojoa1997 » Tue Sep 03, 2013 00:00

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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Sep 03, 2013 00:40

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 » Tue Sep 03, 2013 00:47

Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

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

by jojoa1997 » Tue Sep 03, 2013 01:45

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
 

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

by PilzAdam » Tue Sep 03, 2013 02:00

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
 

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

by jojoa1997 » Tue Sep 03, 2013 02:12

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
 

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

by jojoa1997 » Tue Sep 03, 2013 10:55

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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Sep 03, 2013 11:03

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 » Tue Sep 03, 2013 11:19

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
 


Return to Problems



Who is online

Users browsing this forum: No registered users and 9 guests