I need a little help

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

I need a little help

by InfinityProject » Sat Jul 14, 2012 05:38

I'm making a crossbow mod and want a crossbow that when it shoots a bolt that bolt produces fire on contact with a node.
What I have:
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.env:add_item(self.lastpos, fire.on_flame_add_at(pos))


But there's a bug:
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
ServerError: LuaError: error running function 'on_step':
...attempt to index global 'fire' (a nil value)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Jul 14, 2012 08:32

InfinityProject wrote:I'm making a crossbow mod and want a crossbow that when it shoots a bolt that bolt produces fire on contact with a node.
What I have:
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.env:add_item(self.lastpos, fire.on_flame_add_at(pos))


But there's a bug:
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
ServerError: LuaError: error running function 'on_step':
...attempt to index global 'fire' (a nil value)

Because, remove fire and place "function" in, you are trying to declare something that does not exist. Or the function bit could be wrong, I got this last night.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Mon Jul 16, 2012 21:23

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.env:add_item(self.lastpos, function on_flame_add_at(pos))

This is what I tried but it didn't work. I feel like it needs more info.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 15 guests

cron