Time Nick Message 04:38 Joee hi 04:38 Joee anyone here could help me Vehicle_mash mod? 04:48 can-ned_food not I, sorry 04:48 Joee okay 05:20 tiwake cheapie: hi 05:57 * cheapie waves to tiwake 08:45 Krock ensonic ~~~~> #minetest-de 08:46 IhrFussel Why is damage NIL in on_punchplayer() ? 08:54 IhrFussel I'm trying to get the TOTAL damage from a hit and want to add to it based on a table value ... but damage is nil it seems 08:56 IhrFussel The Lua API also doesn't mention anything about the "damage" parameter 09:10 IhrFussel WAIT...are you telling me that you cannot register when a player punches an entity?? 09:31 Krock IhrFussel, huh? there's "on_punch" 09:33 IhrFussel Krock, I meant a general way to get the total damage a player did to an entity but I guess there isn't...doesn't matter now I modified the Mobs Redo mod in a way that it directly calculates the table value inside the damage handler 09:34 Krock you can clculate the damage using tool_capabilities 09:36 IhrFussel Yes but I thought I wouldn't have to calculate the damage between entities and players separately 09:36 IhrFussel register_on_punchplayer() doesn't fire when a player hits an entity AFAIK 09:36 Krock the mobs redo already calculates the damage here: https://github.com/tenplus1/mobs_redo/blob/master/api.lua#L2052 09:37 Krock yes, they're handled seperately 09:37 Krock but you could write a generic wrapper to redirect both callbacks into your own function 09:37 Krock which then could handle players and entities the same way 09:38 Krock on_punchplayer only differs from the entity on_punch by its damage param 09:50 IhrFussel Setting the nametag text only won't affect its color right? Like this plo:set_nametag_attributes({ text = "L."..level[pn].."\n"..pn }) 09:52 Krock depends if the color can be specified seperately 09:52 Krock because you couldn't do this with chat messages, as they're colored in-text 09:54 IhrFussel I will try it I guess 09:58 IhrFussel Krock, it works, the color is unaffected 10:12 Krock great 10:59 IhrFussel Krock, well actually I'm not so sure...the player I asked seemed to be a bit confused when I asked him if my name is still colored 11:01 Krock outdated client 11:02 Krock or a very sophisticated one - as you can read his mimics to see if he's confused 11:04 IhrFussel That's pretty simple... "Umm...?" is enough to see that the person is confused :P 13:11 WSDguy2014 I saw at the end of the changelog for 0.4.16, why is there a "Minetest Game changes"? It's empty here. It's still work in progress? 13:12 sfan5 nobody has taken the work of writing the changelog yet 13:37 red-001 ^ 15:19 IhrFussel If a file exists but is empty Lua sees it as NIL? 15:20 IhrFussel I mean the file handler doesn't return nil but read() does 15:27 calcul0n IhrFussel, it's normal, read returns nil on EOF 15:28 agaran hi IhrFussel 15:28 IhrFussel That's still weird...it caused many server crashes cause I honestly didn't expect a NIL when a file is empty 15:29 IhrFussel Hello agaran 15:31 calcul0n why is it weird ? if it's empty you just reach eof immediatly 15:31 IhrFussel calcul0n, but empty != nil 15:31 IhrFussel local bla = nil is also not the same as local bla = "" AFAIK 15:32 calcul0n yes, but as read() reads line by line, you wouldn't be able to make the difference between eof and an empty line 15:32 agaran IhrFussel: it is not, but "" takes memory, returning 'nil' takes less.. 15:33 agaran zero byte string needs to be returned as unique copy of such object, nil can be singleton, you won't be appending to it.. (and operator can be overloaded to return valid stuff if you do anyway) 15:33 agaran well it is lua.. expect unexpected :) 15:33 IhrFussel Yes but my point is: Why does read() handle it so different from the rest of Lua? That is confusing 15:35 sfan5 read returns "" for empty files 15:35 sfan5 you are doing something wrong 15:35 calcul0n it returns nil here 15:36 Fixer Can't attach anything on github issues... pics/gifs/etc... newest Firefox. Is it only me? 15:37 Fixer for quite long time 15:37 Fixer is broken since some time 15:37 agaran sfan5: could you please show your test code maybe it is lua version related? 15:37 sfan5 it does not https://a.uguu.se/XnM38acSQDRx_Bildschirmfoto_2017-06-18_17-36-48.png 15:38 agaran sfan5: on 5.2 that example does not work.. 15:38 agaran > content = f:read("a*") 15:38 agaran stdin:1: bad argument #1 to 'read' (invalid option) 15:38 agaran stack traceback: 15:39 sfan5 it's *a 15:40 agaran right, my bad 15:40 calcul0n same here, "*a" works in 5.3 but not in the minetest version 15:40 calcul0n which is 5.1 iirc 15:40 sfan5 you're right tho it returns nil in 5.2 15:40 calcul0n here it returns "" with "*a" but nil with no argument 15:41 IhrFussel It returns nil on my PC too "echo -n "" > test.txt in Bash then local lch = (io.open("/home/emmanuel/test.txt", "r")); print(lch:read()) >>> nil 15:41 agaran sfan5: it just screams, we need regresion testing.. for LUA dev.. 15:41 sfan5 you are not supposed to call read without arguments https://www.lua.org/pil/21.1.html 15:42 sfan5 it seems like lua changed this behaviour with 5.3 15:42 IhrFussel The point is read() is supposed to READ the file contents...and an empty string is STILL content IMO 15:43 calcul0n This pattern is the default for read, so io.read() has the same effect as io.read("*line"). 15:43 agaran IhrFussel: it is just lua weirdness.. you can only prepare your code to be resitant to this.. 15:43 calcul0n but yes, 5.3 seems very different 15:44 IhrFussel My PC has Lua 5.2.4 btw 15:44 agaran and what lua version you used to compile minetest with? 15:44 sfan5 minetest can only use lua5.1 or luajit 15:44 IhrFussel MT uses 5.1 or not? 15:46 Calinou IhrFussel: Minetest supports only Lua 5.1 15:46 Calinou don't use 5.2 or 5.3-specific features 15:46 Calinou (this is also because LuaJIT supports only 5.1 at most) 15:48 IhrFussel Calinou, I didn't use any 5.3 features...it simply confused me that Lua wants to try to tell me that an empty EXISTING string can be "nil" 15:48 sfan5 it doesnt return an empty string 15:49 IhrFussel But it READS an empty string, so I expect it to return an empty string ... it's bad behavior that it doesn't 15:50 calcul0n as i said how would you tell if you reached eof or just read an empty line ? 15:50 calcul0n if the file is empty it just contains nothing, that makes sense to me 15:51 IhrFussel Yes it contains nothing but nil means "not initialized" or not? 15:52 calcul0n well, it means "nothing" 15:52 IhrFussel NIL = non-existent usually 15:52 calcul0n so, you're reading non_existent datas, what's wrong ? 15:53 IhrFussel I was told that empty != non-existent in Lua here recently ... so this behavior is unexpected 15:57 IhrFussel But it doesn't matter now...this stupid behavior crashed my server quite a few times today and NOW I know that read() will be nil if the file has no contents 17:56 MinetestBot 02[git] 04nerzhul -> 03minetest/minetest: Cpp11 patchset 11: continue working on constructor style migration (#… 134faaadc https://git.io/vHjGu (152017-06-18T17:55:15Z) 18:07 Joel___ Hi 18:55 Hijiri IhrFussel: read without any specifiers means "read a line" 18:56 Hijiri not "read the file" 18:56 Hijiri there are no more lines, so it returns nil 18:56 Hijiri I don't see how this goes against convention 18:58 Hijiri oh wait no, it returns empty string for reading a line of empty file at first 18:58 Hijiri but that is because the file follows the convention of having a newline before EOF 19:00 Hijiri When I remove the newline before EOF it returns nil on first read() 19:03 sfan5 Hijiri: read("*a") returns nil for empty files 19:03 sfan5 whether it should do that is a matter of definiton 21:09 lastly its been a few years and versions since I've played MT, but just installed again and unified-inventory is not allowing me to use the sethome, gohome, day and night buttons in the inventory formspec. Anyone know a quick fix for this or am I doing something wrong? 21:39 Joel___ i need help with vehicle_mash 21:40 Fixer lastly: you probably don't have needed privs 21:40 Fixer lastly: if in singleplayer: /grantme all 21:40 Joel___ Fixer can u help me with vehicle_mash mod? 21:40 Fixer nope 21:40 Fixer no idea 21:42 lastly yeah, tried /grantme all.. still not working 21:43 Fixer lastly: rejoin 21:44 lastly thank you very much.. that worked.. I feel kinda dumb now... when something isn't working, turn it off and back on 21:44 lastly how simple 22:02 Fixer !next 22:02 MinetestBot Another satisfied customer. Next! 22:03 numzero =) 22:03 numzero oh well, that bot may be funny) 22:03 numzero !btc 22:03 MinetestBot 1 BTC = 2488.0500 $ 22:03 MinetestBot 02[git] 04nerzhul -> 03minetest/minetest: Client::makeScreenshot: remove device param 138f2e60a https://git.io/vHjEL (152017-06-18T22:00:55Z) 22:05 red-001 !USD 22:05 red-001 !usd 22:21 Joel___ how to set up vehicles mash?? 22:28 kaeza !rainbow numzero 22:28 MinetestBot 4nu7mz8er3o 22:28 numzero =) 22:28 kaeza <3 MinetestBot 22:28 MinetestBot <3 kaeza 22:39 Dumbeldor <3 MinetestBot 22:39 MinetestBot <3 Dumbeldor 23:50 Jordach coool 23:51 kaeza ¿ 23:51 Jordach fiddling with some python 23:53 kaeza blender? 23:53 Jordach no 23:53 Jordach trying to make my keyboards RGB LEDs do a full day night cycle in real time 23:53 kaeza heh 23:54 Jordach using python to script it all 23:54 Jordach is the moon up? is it AM? put moon to the right, if PM, put the moon on the left 23:57 Jordach wait, invert that 23:57 Jordach i'm legit a retard