Help

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

Help

by tyo445 » Sun Dec 02, 2012 14:55

Computer got messed up and I lost a bunch of stuff including mymod. I am trying to rewrite it and I get this:
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
10:48:40: ERROR[main]: Failed to load and run script from
10:48:40: ERROR[main]: C:\Users\Will\Documents\minetest-0.4.3-win32 (1)\minetest-0.4.3-win32\bin\..\mods\minetest\decomod\init.lua:
10:48:40: ERROR[main]: ...inetest-0.4.3-win32\bin\..\builtin/misc_register.lua:62: Name mymod:decowood does not follow naming conventions: "modname:" or ":" prefix required
10:48:40: ERROR[main]: stack traceback:
10:48:40: ERROR[main]:     [C]: in function 'error'
10:48:40: ERROR[main]:     ...inetest-0.4.3-win32\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
10:48:40: ERROR[main]:     ...inetest-0.4.3-win32\bin\..\builtin/misc_register.lua:98: in function 'register_item'
10:48:40: ERROR[main]:     ...inetest-0.4.3-win32\bin\..\builtin/misc_register.lua:154: in function 'register_node'
10:48:40: ERROR[main]:     ...st-0.4.3-win32\bin\..\mods\minetest\decomod\init.lua:2: in main chunk

Here is my code
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
print('loading decomod')
minetest.register_node("mymod:decowood", {
tile_images = {"decowood.png"},
groups={choppy=1},
})
minetest.register_craft({
output = '"tutorial:decowood" 2',
recipe = {
{'default:wood', 'default:wood', ''},
{'default:wood', 'default:stone', ''},
{'', '', ''},
}
})
Last edited by tyo445 on Wed Jun 05, 2013 19:53, edited 1 time in total.
Don't.Turn.Around.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sun Dec 02, 2012 15:04

Can you give us the logs of the error?
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Sun Dec 02, 2012 15:08

LorenzoVulcan wrote:Can you give us the logs of the error?

sure
08:06:04: ERROR[main]: ModError: Failed to load and run C:Users\me\Desktop\minetest-0.4.3-win32\minetest-0.4.3-win32\bin..\mods\minetest\mymod\init.lua
Don't.Turn.Around.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Dec 02, 2012 15:16

tyo445 wrote:
LorenzoVulcan wrote:Can you give us the logs of the error?

sure
08:06:04: ERROR[main]: ModError: Failed to load and run C:Users\me\Desktop\minetest-0.4.3-win32\minetest-0.4.3-win32\bin..\mods\minetest\mymod\init.lua


Aren't there more ERROR lines in your debug.txt?

Edit: do you have a file depends.txt in the folder of the mod you made?
If not make one and type default in it.

Edit1: change the ) of the register craftitems, on the first line, (circut and reciver) into {
Last edited by Topywo on Sun Dec 02, 2012 15:25, edited 1 time in total.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sun Dec 02, 2012 15:22

>\mods\minetest\mymod\init.lua

Go on "games" folder.

create a new folder named "mygame"

Copy the "games/minimal" content into "mygame"

then put "mymod" folder into "mygame/mods"

Delete "mymod" into "mods/minetest"

Create a new world and selec "mygame" in the list.

You have now your working personal sandbox.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Sun Dec 02, 2012 15:35

Topywo wrote:
tyo445 wrote:
LorenzoVulcan wrote:Can you give us the logs of the error?

sure
08:06:04: ERROR[main]: ModError: Failed to load and run C:Users\me\Desktop\minetest-0.4.3-win32\minetest-0.4.3-win32\bin..\mods\minetest\mymod\init.lua


Aren't there more ERROR lines in your debug.txt?

Edit: do you have a file depends.txt in the folder of the mod you made?
If not make one and type default in it.

Edit1: change the ) of the register craftitems, on the first line, (circut and reciver) into {

thank you. I actually have not made depends and will make your reccomendations now.
Don't.Turn.Around.
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Sun Dec 02, 2012 16:31

tyo445 wrote:
LorenzoVulcan wrote:>\mods\minetest\mymod\init.lua

Go on "games" folder.

create a new folder named "mygame"

Copy the "games/minimal" content into "mygame"

then put "mymod" folder into "mygame/mods"

Delete "mymod" into "mods/minetest"

Create a new world and selec "mygame" in the list.

You have now your working personal sandbox.

ERROR

09:29:31: ERROR[main]: ========== ERROR FROM LUA ===========
09:29:31: ERROR[main]: Failed to load and run script from
09:29:31: ERROR[main]: C:\Users\me\Desktop\minetest-0.4.3-win32\minetest-0.4.3-win32\bin\..\games\mygame\mods\mymod\init.lua:
09:29:31: ERROR[main]: ...0.4.3-win32\minetest-0.4.3-win32\bin\..\games\mygame\mods\mymod\init.lua:31: unexpected symbol near '}'
09:29:31: ERROR[main]: =======END OF ERROR FROM LUA ========
Don't.Turn.Around.
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Sun Dec 02, 2012 16:39

LorenzoVulcan wrote:
tyo445 wrote:ERROR

What error?

09:29:31: ERROR[main]: ========== ERROR FROM LUA ===========
09:29:31: ERROR[main]: Failed to load and run script from
09:29:31: ERROR[main]: C:\Users\me\Desktop\minetest-0.4.3-win32\minetest-0.4.3-win32\bin\..\games\mygame\mods\mymod\init.lua:
09:29:31: ERROR[main]: ...0.4.3-win32\minetest-0.4.3-win32\bin\..\games\mygame\mods\mymod\init.lua:31: unexpected symbol near '}'
09:29:31: ERROR[main]: =======END OF ERROR FROM LUA ========
Don't.Turn.Around.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Dec 02, 2012 21:09

groups={level=1} --> you need to add or replace it with something like (examples) crumbly=1 , cracky=3, oddly_breakable_by_hand=1

See for some good examples the init.lua of celeron55-minetest-------/games/minetest_game/mods/default.
Explanation of those words: https://github.com/celeron55/minetest/blob/master/doc/lua_api.txt
Groups in general line 381 and further.
Digtime of groups line 464 and further.

And about the error, you need to change the lay out of the 1st line of all your register craft items to:
minetest.register_craftitem("default:stick", {

Example:
minetest.register_craftitem{"mymod:circut"} --->
minetest.register_craftitem("mymod:circut",{

(The error pointed to line 31 in your init.lua file. The first error it meets. If you don't use a program using line numbers, you can try with the program you use to write lua to jump (under search) to line 31).

Good luck
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron