Page 1 of 1
Does anyone know what i did wrong?

Posted:
Sat Oct 13, 2012 20:50
by Chinchow
Ok so I'm trying to make cobblestone bricks but it wont work here is the 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
minetest.register_node( "stonebricks_cobble_bricks", {
description = "Cobblebricks",
tile_images = { "cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
}
}
})
minetest.register_craft({
output = 'cobble_bricks",
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})

Posted:
Sat Oct 13, 2012 21:35
by VanessaE
Get rid of the extra two braces just below the sounds= line. Also, your proposed recipe will conflict with More Blocks "stone square".

Posted:
Sat Oct 13, 2012 21:55
by Topywo
Chinchow wrote:Ok so I'm trying to make cobblestone bricks but it wont work here is the code
minetest.register_node("stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = {"stonebricks_cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'stonebricks:cobble_bricks 6',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})
Red = need to change
Blue = not necessary
Don't forget to have a folder called textures with a file called stonebricks_cobble_bricks.png
and VanessaE is right, so maybe try an extra row (edit:) and an output of 6 (or 3 or 1 whatever you like)
Good luck!

Posted:
Sat Oct 13, 2012 21:59
by Chinchow
Ok I tried them and here is the new version but it still won't work
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
minetest.register_node( "stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = { "_stonebricks_cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'cobble_bricks 9',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})

Posted:
Sat Oct 13, 2012 22:49
by Topywo
Chinchow wrote:Ok I tried them and here is the new version but it still won't work
minetest.register_node( "stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = { "_stonebricks_cobble_bricks.png" }, --> The underscore "_" causes a dummy image to be used, so you need to remove it.
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'stonebricks:cobble_bricks 9', --> Without the mod name "stonebricks" your output will be an unknown item.
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})
Edit: removed code stuff for colors

Posted:
Sat Oct 13, 2012 23:16
by Chinchow
For some reason it still wont work

Posted:
Sat Oct 13, 2012 23:35
by Topywo
Copy paste this code in the init.lua:
minetest.register_node( "stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = { "stonebricks_cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'stonebricks:cobble_bricks 9',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})
I've tested it and it works. For the line: tiles = { "stonebricks_cobble_bricks.png" },
I used an .png image I save (as) with the name: stonebricks_cobble_bricks.png
- The name of the folder of your mod must be: stonebricks --> no CAPS
- In the stonebricks folder must be an init.lua with the lines I asked you to copy and paste
- In the stonebricks folder, there must be a folder called textures (no CAPS to be sure).
- In the textures folder must be at least 1 .png file called (no CAPS) stonebricks_cobble_bricks.png
- In the stonebricks folder must be a file called depends.txt (no CAPS to be sure),
- In the depends.txt folder must be 1 line with the text: default (copy/paste it in there)
My first guess is that you don't have the depends.txt file (with the single word "default' in it).
Good luck and don't give up on it!

Posted:
Sat Oct 13, 2012 23:51
by Chinchow
It still won't work butI am not giving up this mod is going to be created but thanks for all you're help Topywo and thanks for your help VanessaE

Posted:
Sun Oct 14, 2012 00:04
by Topywo
Okay, then maybe the debug.txt will give some helpfull info:
Exit minetest completely, go to your home folder/directory, delete the debug.txt file, start minetest up again. Try to create/start a game, leave minetest again, go to your home folder, doubleclick on debug.txt to open it with your default text editor, search for ERROR (most of the time the bottom part), copy all those error lines and paste them here.
I'm curious :-)

Posted:
Sun Oct 14, 2012 01:00
by Chinchow
I will tomorrow my computer needs to recharge and im on my dsi right now

Posted:
Sun Oct 14, 2012 01:10
by Topywo
Good, I need some sleep anyway :-)

Posted:
Mon Oct 15, 2012 19:34
by Chinchow
" Failed to load and run script from
19:55:02: ERROR[main]: C:\Users\Cameron\Downloads\minetest-0.4.3-4a11323-meta_set_nodedef-win32\minetest-0.4.3-4a11323-meta_set_nodedef-win32\bin\..\mods\minetest\stonebricks\init.lua:
19:55:02: ERROR[main]: ...edef-win32\bin\..\mods\minetest\stonebricks\init.lua:6: attempt to index global 'default' (a nil value)
19:55:02: ERROR[main]: stack traceback:
19:55:02: ERROR[main]: ...edef-win32\bin\..\mods\minetest\stonebricks\init.lua:6: in main chunk
there is the debug.txt

Posted:
Mon Oct 15, 2012 19:58
by GloopMaster
needs to depend on default then

Posted:
Mon Oct 15, 2012 20:15
by Chinchow
I feel noobish I accidentally put depends.txt