Where's the mistake

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

Where's the mistake

by Tedypig » Sat Mar 09, 2013 21:44

I'm trying to make a tiki torch "mod" for my girlfriend. I am VERY new to modding/coding, so I copy/pasted the register node from the original torch and deleted/replaced what i needed to. Now I'm getting a fail to load error. Here is a SS of the code.

Image

Any help is appreciated.
Last edited by Tedypig on Sat Mar 09, 2013 21:44, edited 1 time in total.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

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

by PilzAdam » Sat Mar 09, 2013 21:45

1st: Dont post screenshots of your code, post the code in the code tags of BBCode.
2nd: Post the error message.
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Sat Mar 09, 2013 21:50

Here is the error message.

16:31:51: ERROR[main]: Failed to load and run script from
16:31:51: ERROR[main]: C:\Users\Matt and Betty\Downloads\minetest-0.4.5\minetest-0.4.5\bin\..\mods\minetest\tiki_torch\init.lua:
16:31:51: ERROR[main]: ...s\minetest-0.4.5\minetest-0.4.5\bin\..\mods\minetest\tiki_torch\init.lua:20: ')' expected (to close '(' at line 8) near '='
16:31:51: ERROR[main]: =======END OF ERROR FROM LUA ========



And 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
--Tiki_torch by Tedypig






minetest.register_node("tiki_torch:tiki_torch", {
    description = "Tiki Torch",
   

drawtype = "torchlike",
    {"tiki_torch.png", "tiki_torch.png", "tiki_torch.png"},

   

inventory_image = "tiki_torch.png",
    wield_image = "tiki_torch.png",
    paramtype =

"light",
    sunlight_propagates = true,
    walkable = false,
    light_source =

LIGHT_MAX-1,
    },
    groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
   

legacy_wallmounted = false,

})



minetest.register_craft({
    output = 'tiki_torch:tiki_torch',
    recipe = {
        {'', 'default:torch', ''},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})



I'm sorry. I didn't know not to do that.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Sat Mar 09, 2013 21:57

Use a good code editing program instead of a texteditor. Then just do the mod again.
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Sat Mar 09, 2013 21:58

Casimir wrote:Use a good code editing program instead of a texteditor. Then just do the mod again.


Can you suggest a good FREE one. Emphasis on free. Lol.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
BlockMen
Member
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen

by BlockMen » Sat Mar 09, 2013 22:01

I don't know what you did, but there are way to much blanks, etc

If you type it like folowing it works ;)

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
--Tiki_torch by Tedypig


minetest.register_node("tiki_torch:tiki_torch", {
    description = "Tiki Torch",
    drawtype = "torchlike",
    tiles={"tiki_torch.png", "tiki_torch.png", "tiki_torch.png"},
    inventory_image = "tiki_torch.png",
    wield_image = "tiki_torch.png",
    paramtype = "light",
    sunlight_propagates = true,
    walkable = false,
    light_source = LIGHT_MAX-1,
    groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
        legacy_wallmounted = false,
})


minetest.register_craft({
    output = 'tiki_torch:tiki_torch',
    recipe = {
        {'', 'default:torch', ''},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})


PS: make sure you select "ANSI" (coding), when working with notepad
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Sat Mar 09, 2013 22:10

Thank you Blockmen. It was really just blank spaces? I don't know proper structure yet, but I guess that will come with experience right? Lol. Thanks again.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
BlockMen
Member
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen

by BlockMen » Sat Mar 09, 2013 22:36

Tedypig wrote:Thank you Blockmen. It was really just blank spaces? I don't know proper structure yet, but I guess that will come with experience right? Lol. Thanks again.



There was a missing "tiles=" before "{"tiki_torch.png", "tiki_torch.png", "tiki_torch.png"},"
and a "}" too much after "LIGHT_MAX-1,".


But im sure you would have found yourself when there haven't been all that blank spaces ;)

And yes, keep that way on and you will get enough experience to see errors like that really fast
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Sat Mar 09, 2013 23:07

I got luaedit just now and i can see that stuff easily. Lol.

Another question (if anyone knows), How do I make part of a texture transparent in gimp? The node for my tiki torch has my (temporary) torch, but there's white all the way around it.

Edit:Fat fingers, had a typo.
Last edited by Tedypig on Sat Mar 09, 2013 23:08, edited 1 time in total.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Sun Mar 10, 2013 01:08

Tedypig wrote:How do I make part of a texture transparent in gimp?

First you have to make sure that every layer in the image has an alpha channel (if your image has only a single layer, this still applies). To do this, activate each layer and choose Layer -> Transparency -> Add Alpha Channel from the menus (if this menu entry is disabled, the layer already has an alpha channel).

Next, you can use the eraser tool or make a selection and choose Edit -> Clear from the menus (or use the Delete key as a shortcut). Note that for a section of your image to be transparent, it must be transparent on all layers of your image.
Last edited by prestidigitator on Sun Mar 10, 2013 01:09, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 12 guests

cron