CODEING PROBLEM

chase programer
Member
 
Posts: 117
Joined: Thu Jan 03, 2013 16:56

CODEING PROBLEM

by chase programer » Wed May 15, 2013 21:04

Is this right )=
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_craft({
    output = 'Deathpick:Death_pick',
    recipe = {
        {'default:coallump', 'default:coallump', 'default:coallump'},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})
-- Tool
minetest.register_tool("Deathpick:Death_pick", {
    description = "Death Pickaxe",
    inventory_image = "Deathpick.png",
    tool_capabilities = {
        full_punch_interval = 1.0,
        max_drop_level=3,
        groupcaps={
            cracky={times={[2]=2.5, [2]=1.5, [3]=1.0}, uses=1000, maxlevel=10},
            crumbly={times={[2]=2.0, [2]=1.0, [3]=0.5}, uses=1, maxlevel=1},
            snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=1000, maxlevel=10}
        }
    },
})
Last edited by chase programer on Wed May 15, 2013 21:06, edited 1 time in total.
Back and ready to help with this amazing community that i lost.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed May 15, 2013 21:10

Looks like it SHOULD work, if only on 0.4.5 (or lower). What's broken? Damage? Craft-

... shouldn't it be default:coal_lump, not default:coallump? That might fix crafting.

EDIT:
I really don't know what the heck I'm doing with code, so my advice might not be all that helpful. I'm a "mod-modder", a "script modder" rather than an actual coder. From memory, coallump is the issue.

EDIT EDIT:
Look at the [2] things again: you define it TWICE for two groups (crumbly, and something else). I'm pretty sure that you meant to type [1] [2] [3] once, not [2] [2] [3].

EDIT EDIT EDIT:
Yay, got ninja replied.
Last edited by tinoesroho on Wed May 15, 2013 21:14, edited 1 time in total.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

chase programer
Member
 
Posts: 117
Joined: Thu Jan 03, 2013 16:56

by chase programer » Wed May 15, 2013 21:11

tinoesroho wrote:Looks like it SHOULD work, if only on 0.4.5 (or lower). What's broken? Damage? Craft-

... shouldn't it be default:coal_lump, not default:coallump? That might fix crafting.


Ok i have the newest update and i wanted it to work )=
Back and ready to help with this amazing community that i lost.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed May 15, 2013 21:13

I think the damage system was changed for 0.4.6 (can't confirm). Default.lua should define tools/weapons; take a look at that if you haven't already.

EDIT:
... this topic goes over the new damage system.
Last edited by tinoesroho on Wed May 15, 2013 21:15, edited 1 time in total.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

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

by PilzAdam » Wed May 15, 2013 21:21

This is definetly in the wrong section of the forum. It should be in Modding General.

Also, it might help you if you just read other mods and/or the default mod(s) to get some experience with Lua.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu May 16, 2013 05:06

Moved to Modding General, because wrong section
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Thu May 16, 2013 07:12

Uppercase letters in mod names and file names (textures) is a bad practice, by the way.
Last edited by Calinou on Thu May 16, 2013 07:13, edited 1 time in total.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Thu May 16, 2013 14:20

... although it won't break anything. It'll just confuse people like hell (and make sure your files and folders actually have uppercase letters, otherwise you just broke the mod on Linux). :-/

What's the status?
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Thu May 16, 2013 16:22

I tried making a mod called YAMM but it was not allowed.

(Says "a-z,0-9 only")
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Thu May 16, 2013 16:45

There you have 't. I think that's all the problems in the code, all laid out.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 27 guests

cron