Minetest logo

IRC log for #minetest-mods, 2013-04-10

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

All times shown according to UTC.

Time Nick Message
01:06 ecube joined #minetest-mods
02:52 JesseH left #minetest-mods
10:44 PilzAdam joined #minetest-mods
13:21 Wuzzy joined #minetest-mods
14:24 PilzAdam joined #minetest-mods
15:04 NakedFury joined #minetest-mods
16:24 rubenwardy joined #minetest-mods
16:25 rubenwardy what is "fields"? http://dev.minetest.net/minetest.​register_on_player_receive_fields
16:25 rubenwardy never mind, the {} bit is showing it is a table
16:26 rubenwardy what about "formname", is it meant to be formname, and I then check it?
16:29 rubenwardy minetest.register_on_player_re​ceive_fields(function(player, "privilegeareas:gui", fields)
16:29 rubenwardy pilzadam
16:44 PilzAdam fieldname is the name of the element that is pressed
16:46 PilzAdam so if you do register_on_recieve_fields(function(_, name, _) print(name)) then it will output the name of the button that is clicker
16:46 PilzAdam *clicked
16:46 PilzAdam (or the name of the text field were enter is pressed)
16:47 PilzAdam the name of the object is declared in the formspec string, e.g. here: https://github.com/minetest/minetes​t/blob/master/doc/lua_api.txt#L808
16:47 PilzAdam bbl
17:25 rubenwardy what is wrong with this: https://gist.github.com/rubenwardy/5356637
17:26 rubenwardy The error is on line 44 or 51
17:26 rubenwardy type does not exist
17:26 rubenwardy or "attempt to index field 'type' (a string value)"
17:27 PilzAdam why dont you use .type instead of ["type"]?
17:27 rubenwardy I tried that
17:27 rubenwardy same problem
17:27 rubenwardy just checking all possibilties
17:27 PilzAdam yes, it doesnt fix anything, but its better coding style
17:28 rubenwardy i know
17:28 rubenwardy It was originally that
17:28 rubenwardy brb
17:45 rubenwardy|away back
17:54 rubenwardy ping: pilzadam
17:54 PilzAdam pong
17:55 rubenwardy any suggestions?
17:56 rubenwardy wait, it is the field type
17:57 rubenwardy line 45 and 52 (refresh gist)
17:59 rubenwardy how do you set a buttons label in register_on_player_receive_fields, or do I have to resend the form spec?
18:00 rubenwardy ^ pilzadam
18:01 PilzAdam you have to resend the whole formspec
18:01 rubenwardy and can you get a button's label?
18:02 PilzAdam nope
18:02 PilzAdam you can comminicate that with the formspec name
18:03 berome joined #minetest-mods
18:03 PilzAdam *communicate
18:03 rubenwardy and how do you get a field's text?
18:03 rubenwardy fields.name.text ?
18:04 rubenwardy or does  fields.name = text
18:04 PilzAdam fields["name"] -> content
18:05 rubenwardy thank you for your help
18:08 rubenwardy how do I make the button level with the field? https://gist.github.com/rubenward​y/5356637#file-gistfile1-txt-L22]
18:08 rubenwardy https://gist.github.com/rubenward​y/5356637#file-gistfile1-txt-L22
19:00 berome_ joined #minetest-mods
22:17 jordan4ibanez joined #minetest-mods

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