Minetest logo

IRC log for #minetest-mods, 2014-05-22

| Channels | #minetest-mods index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:20 phantombeta_ joined #minetest-mods
00:22 phantombeta joined #minetest-mods
00:25 phantombeta joined #minetest-mods
00:50 Glunggi left #minetest-mods
03:13 loggingbot_ joined #minetest-mods
03:13 Topic for #minetest-mods is now Welcome to #minetest-mods, a channel dedicated to Minetest modding. | http://minetest.net | http://tinyurl.com/mt-lua-api
03:36 Exio4 joined #minetest-mods
03:57 Zefram_Fysh joined #minetest-mods
03:58 kaeza joined #minetest-mods
04:42 asie joined #minetest-mods
06:10 phantombeta joined #minetest-mods
07:45 Zefram_Fysh joined #minetest-mods
10:16 kaeza joined #minetest-mods
13:16 phantombeta joined #minetest-mods
13:29 phantombeta joined #minetest-mods
13:53 phantombeta joined #minetest-mods
14:33 Bhima_ joined #minetest-mods
15:58 PilzAdam joined #minetest-mods
16:16 rubenwardy joined #minetest-mods
17:00 diemartin joined #minetest-mods
17:05 diemartin joined #minetest-mods
17:32 asie joined #minetest-mods
19:05 TenPlus1 joined #minetest-mods
19:05 TenPlus1 hi folks
19:06 TenPlus1 does anyone know a way to get (pos) of a nod within minetest.register_on_playe​r_fields(function(player, forename, fields)   ???
19:06 TenPlus1 *node
19:06 Zefram_Fysh that depends on which node you're interested in
19:07 TenPlus1 it's driving me nuts...  without (pos) I cannot get metadata within that function...
19:07 TenPlus1 it's a chest formspec I'm editing and once I've entered a field it calls the above function... but it doesnt have pos
19:08 Zefram_Fysh on_player_fields isn't naturally tied to a node
19:08 Zefram_Fysh for a chest you want an on_receive_fields in the node type definition
19:08 TenPlus1 that's the problem, I cant see a way to get the node potision once I enter text into formspec... and without that I cannot save anything I enter within the node itself
19:08 TenPlus1 I tried that too, it wouldnt work...
19:09 Zefram_Fysh the node type's on_receive_fields gets (pos, formname, fields, sender)
19:09 TenPlus1 I had   on_receive_fields within the definition and again on entry it ignored it completely... the only thing that seems to work is the external function
19:12 Zefram_Fysh on_receive_fields is the correct way, and does work in general.  you're not going to find a solution with player_fields
19:14 TenPlus1 I had on_receive_fields within the node definition
19:14 TenPlus1 it skips it completely
19:14 TenPlus1 all I had was a PRINT ("WORKS") statement in there and it wouldnt even show it
19:14 Zefram_Fysh if it didn't work, you did it incorrectly.  you need to work on that
19:15 Zefram_Fysh did you set a formspec for the node initially?
19:15 TenPlus1 on_receive_fields = function(pos, formname, fields, sender)                 print ("WORKS")               end,
19:15 TenPlus1 I have a new chest with 4 text entry boxes at the side for shared users
19:16 TenPlus1 once I enter text and hit enter it ignores the above on_receive_fields  , but works with minetest.register_on_player_receive_fields ok...  I dont get it
19:17 Zefram_Fysh pastebin your complete code
19:18 TenPlus1 http://pastebin.com/WEbTGeFX
19:20 Zefram_Fysh you're not setting a formspec in the node
19:21 Zefram_Fysh you're using show_formspec, which shows a player-associated formspec, which can be picked up with on_player_receive_fields
19:22 Zefram_Fysh it's the wrong tool for the job
19:22 Zefram_Fysh your on_construct function should meta:set_string("formspec", formspec)
19:23 Zefram_Fysh that'll give you a node-associated form, the results of which will come in to the on_receive_fields hook
19:25 TenPlus1 ahh gotcha...   I pretty much copied and pasted the code from minetest game itself for the chest...  never realised that part
19:26 Zefram_Fysh taking a step back, in future you'll generally get better help if you're more careful to ask the right question.  you came in asking how to get a node position in a on_player_receive_fields hook, which wasn't your real problem
19:26 Zefram_Fysh your real problem was to get results from a form attached to a node
19:26 TenPlus1 thanks dude, will check that part out now :)
19:35 phantombeta joined #minetest-mods
19:36 asie joined #minetest-mods
20:06 Exio4 joined #minetest-mods
20:09 asie joined #minetest-mods
22:03 kaeza joined #minetest-mods
22:57 kaeza joined #minetest-mods
23:03 diemartin joined #minetest-mods
23:18 kaeza joined #minetest-mods

| Channels | #minetest-mods index | Today | | Google Search | Plaintext