(SOLVED)Sound problem with my mod

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

(SOLVED)Sound problem with my mod

by qwrwed » Sun May 19, 2013 11:23

[spoiler=original post]I am updating my Hills mod, but when trying to test it in 0.4.6 (on Windows), I get the following error:
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
 
12:14:19: ERROR[main]: ========== ERROR FROM LUA ===========
12:14:19: ERROR[main]: Failed to load and run script from
12:14:19: ERROR[main]: C:\Documents and Settings\User\My Documents\minetest-0.4.6\bin\..\mods\minetest\grassblock\init.lua:
12:14:19: ERROR[main]: ...\minetest-0.4.6\bin\..\mods\minetest\grassblock\init.lua:6: attempt to index global 'default' (a nil value)
12:14:19: ERROR[main]: stack traceback:
12:14:19: ERROR[main]:     ...\minetest-0.4.6\bin\..\mods\minetest\grassblock\init.lua:6: in main chunk
12:14:19: ERROR[main]: =======END OF ERROR FROM LUA ========

The code is:
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("grassblock:block", {
    description = "Grass Block",
    tiles = {"default_grass.png"},
    is_ground_content = true,
    groups = {crumbly=3},
    sounds = default.node_sound_dirt_defaults({
        footstep = {name="default_grass_footstep", gain=0.4},
    }),
})

The default mod in the common folder has the same code for sounds, so I don't know what I'm doing wrong.[/spoiler]
Solution: add default to the depends.txt
Last edited by qwrwed on Wed Jan 08, 2014 18:14, edited 1 time in total.
 

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

by PilzAdam » Sun May 19, 2013 11:25

First of all, this is the wrong section, it should be in Modding General.

To fix your problem add default to depends.txt.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun May 19, 2013 11:26

Add 'default' to 'depends.txt' (create if necessary).
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Sun May 19, 2013 11:46

Thanks. I knew there was going to be a simple fix. Can a moderator close this topic?
Last edited by qwrwed on Wed Jan 08, 2014 18:13, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron