*WHAP* I don't know how I missed that. Thank you.paramat wrote:tiles should be "troll_troll.png" not "troll:troll.png" etc
Post your modding questions here
- Enke
- Member
- Posts: 469
- Joined: Fri Nov 15, 2013 02:56
- GitHub: NANOsoldierEnke
- IRC: Enke
- In-game: Enke
- Location: The internet
Lush8
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
- Enke
- Member
- Posts: 469
- Joined: Fri Nov 15, 2013 02:56
- GitHub: NANOsoldierEnke
- IRC: Enke
- In-game: Enke
- Location: The internet
does this: make it so that there is a 10% chance or a 90% chance?
*Edit* Okay, working on a real mod. I am trying to register craftitems, and here is my code:
and I get this error when I run it:
Can someone explain?
Code: Select all
chance = 10,
*Edit* Okay, working on a real mod. I am trying to register craftitems, and here is my code:
Code: Select all
minetest.register_craftitem("inlaid:inlaytool", {
description = "Inlay tool",
inventory_image = "inlaid_inlaytool.png",
})
minetest.register_craftitem("inlaid:chisel", {
description = "Chisel",
inventory_image = "inlaid_chisel.png",
})
Code: Select all
21:52:48: ERROR[main]: ...minetest-0.4.7-5094a39-win32\bin\..\mods\inlaid\init.lua:15: unfinished string near '"inlaid_chisel.png,'
Last edited by Enke on Wed Nov 20, 2013 03:59, edited 1 time in total.
Lush8
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
are you sure you posted the relevant part of your code? check line numbers again. The string quoted in the error message is indeed unfinished, and should be closed with and " before the comma.Enke wrote: [...] and I get this error when I run it:Can someone explain?Code: Select all
21:52:48: ERROR[main]: ...minetest-0.4.7-5094a39-win32\bin\..\mods\inlaid\init.lua:15: unfinished string near '"inlaid_chisel.png,'
- Enke
- Member
- Posts: 469
- Joined: Fri Nov 15, 2013 02:56
- GitHub: NANOsoldierEnke
- IRC: Enke
- In-game: Enke
- Location: The internet
This is all the code I have, and I have no clue why the error message says that the line is unfinished.
Lush8
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
Did you do a direct copy/paste of your code here? Because according to your error you are missing a quote mark " at the end of the line that has inlaid_chisel.png. Maybe while typing it in for the lua file your finger accidentally pressed 2 keys at once which causes some keyboards to send some other key code to the computer. It's very easy to do. I have found that sometimes the only way to fix that type of error is select the line around where the problem is and delete it and then retype it in.
- Enke
- Member
- Posts: 469
- Joined: Fri Nov 15, 2013 02:56
- GitHub: NANOsoldierEnke
- IRC: Enke
- In-game: Enke
- Location: The internet
Wow, major derp.... the code I was fiddling with was my backup copy. It did need quote marks in the original code. Thanks guys.
Geez, a derp every day... I'm terribly sorry to have troubled you.
Geez, a derp every day... I'm terribly sorry to have troubled you.
Last edited by Enke on Wed Nov 20, 2013 23:30, edited 1 time in total.
Lush8
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
I have an atmospheric node that seems to block the growth of trees. What would I need to set so trees will replace the node at the appropriate locations, rather than not grow at those locations?
Code: Select all
minetest.register_node("luna:oxygen", {
drawtype = "glasslike",
tiles = {"atmos.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
post_effect_color = {a=24, r=255, g=255, b=255},
groups = {not_in_creative_inventory=1, air_like=1}
})
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Why not give it draw type air like?
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
See: http://dev.minetest.net/minetest.place_nodederpswa99 wrote:How do I use the "minetest.item_place_node" function?
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
How can I make a tool item wear when used pointing at nothing?
I tried this but is does not seem to have any effect.
I tried this but is does not seem to have any effect.
Code: Select all
on_use = function(itemstack, user, pointed_thing)
itemstack:add_wear(100)
user:set_wielded_item(itemstack)
end,
Last edited by stu on Sun Nov 24, 2013 19:36, edited 1 time in total.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
on_use is only called when pointing at something.stu wrote:How can I make a tool item wear when used pointing at nothing?
I tried this but is does not seem to have any effect.
Code: Select all
on_use = function(itemstack, user, pointed_thing) itemstack:add_wear(100) user:set_wielded_item(itemstack) end,
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
That is not true. I can prove this by adding a print statement in there, point at the sky and press LMBPilzAdam wrote: on_use is only called when pointing at something.
I think the problem is with how I am commiting the itemstack, though I got that idea from the dev wiki http://dev.minetest.net/Player
(changes will need to be "committed" by calling object:set_wielded_item(modifiedStack)
Last edited by stu on Sun Nov 24, 2013 20:45, edited 1 time in total.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
I've the feeling, it has already posted here alot but:
How do I make a crafting grid, that needs a pickaxe, which only gets a little damaged, when using it for crafting?
(just giving back is good too)
Okay, I've already found:
Is there also a way to damage it?
How do I make a crafting grid, that needs a pickaxe, which only gets a little damaged, when using it for crafting?
(just giving back is good too)
Okay, I've already found:
Code: Select all
replacements = { ... with ... }
Last edited by Krock on Mon Nov 25, 2013 13:44, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- fairiestoy
- Member
- Posts: 191
- Joined: Sun Jun 09, 2013 19:25
- Location: Germany
*ahem* Just follow this simple steps:
> Open your browser
> Go to https://github.com/minetest/minetest/bl ... ua_api.txt
> Press [Ctrl] + F ( default for Firefox if im not mistaken )
> Input 'wear' within the search field
> Iterate through document until functions are found
Thats how you get this result: https://github.com/minetest/minetest/bl ... .txt#L1754
> Open your browser
> Go to https://github.com/minetest/minetest/bl ... ua_api.txt
> Press [Ctrl] + F ( default for Firefox if im not mistaken )
> Input 'wear' within the search field
> Iterate through document until functions are found
Thats how you get this result: https://github.com/minetest/minetest/bl ... .txt#L1754
Interesting about new things is, to figure out how it works ...
Who is online
Users browsing this forum: No registered users and 6 guests