Time Nick Message 04:04 HecksNotFound Is the hud in 0.5 still broke? 13:31 piesquared Sokomine, prepare so be poked. 13:38 * Sokomine hides :) 13:39 piesquared ? 13:59 piesquared swift110? i remember you from #raspberrypi... waht are the chances 14:40 clears A 14:40 clears Désoler 14:40 clears I'll y a une perssonne français s'ils vous plaît 14:41 sfan5 baguette 14:41 progysm magique 14:42 Andrey01 hi, i am trying to limit a chance to put some items to the node formspec. I made it so: 14:44 Andrey01 allow_metadata_inventory_put = function (pos, listname, index, stack, player) if string.find(stack, "syringe") and string.find(stack, "medicine:") then return -1 end end 14:45 Andrey01 however, this code like has been looped when i am trying to put allowed items 14:46 Andrey01 because the game has stopped and i can see grey screen 14:48 sfan5 stack is not necessarily a string 14:50 Andrey01 why? 14:51 ANAND One can retrieve the string representation of an ItemStack by using ItemStack:to_string() 14:51 ANAND So, local itemstring = stack:to_string() 14:52 ANAND if string.find(itemstring, "syringe") and string.find(itemstring, "medicine:") 14:52 rubenwardy That will include meta though 14:52 ANAND True 14:53 ANAND Not desirable in this case 14:53 ANAND Andrey01: local itemstring = stack:get_name() 14:53 ANAND Since only the item names need to be checked, no need for :to_string() 14:54 Andrey01 thx 14:54 ANAND I hope I'm not misleading you... :) 14:56 Andrey01 unfortunately it doesn`t work :( i get grey screen as before 14:56 ANAND Any error messages? Did you check debug.txt? 14:58 Andrey01 yes, it writes in debug.txt: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: allow_metadata_inventory_put should return a number, guilty node: medicine:medical_bag 14:59 Andrey01 and it returns -1, that is, this item can be put as it is written in dev.minetest.net 15:05 clears why after having made the update on mobile the game does not want to launch anymore 15:07 sfan5 did you download it from the play store? 15:07 clears Yes 15:08 sfan5 hmm 15:08 sfan5 try this: open your file manager, navigate to the sd card, to the "Minetest" folder, delete two folders called "games" and "builtin", then relaunch the app 15:10 Andrey01 here is my code that doesn`t work correctly (with grey screen): https://gist.github.com/Andrey2470T/a630ef57a8813c0406a318c47f0ac72d 15:11 Frodo_ How do i compile Minetest from source code on MacOS high seirra 15:11 sfan5 Andrey01: your function always needs to return a number, not just when the string matches 15:11 sfan5 Frodo_: brew can probably compile a formula from source 15:12 Frodo_ Yah, i know, but im missing to command to make a shortcut so i can open it, 15:12 Frodo_ a 15:13 sfan5 "brew linkapps" used to do that but I think that's deprecated 15:13 Andrey01 sfan5, this function returns -1 if the item is alllowed to put in node inventory, right? 15:13 Frodo_ Tried that i think 15:13 Andrey01 allowed* 15:13 clears it does not work 15:13 sfan5 Andrey01: I don't know, what does the documentation say? 15:17 clears do you speak French 15:17 Frodo_ Nope. 15:20 Andrey01 sfan5, well, for example, it is so written here: https://dev.minetest.net/minetest.register_node#allow_metadata_inventory_put 15:24 sfan5 and it says? 15:24 clears it does not work 15:24 Krock -> #minetest-fr 15:26 Andrey01 it is written i need to return -1 if the item is allowed to put as i already said, but why does it add grey screen? (See my code above) 15:27 sfan5 well it's printing an error 15:27 sfan5 it even tells you what's wrong 15:29 Andrey01 yes, it says the function should return number, but it returns negative number, why does it say this? 15:29 sfan5 which number does it return if the condition in your if statement is false? 15:30 clears it does not work sfan5 15:30 sfan5 clears: i can see that, but I have no other solution I can offer you 15:31 Andrey01 it returns -1 15:32 sfan5 it doesn't 15:32 Andrey01 what should it return then? 15:32 sfan5 the documentation says it should return a number, but it does not return anything 15:35 Andrey01 how does it return nothing?? it returns -1, it is number, right? 15:35 sfan5 "return -1" only runs if the condition is true 15:35 sfan5 nothing happens if the condition is false 15:37 Andrey01 but why is that condition false? 15:39 sfan5 that doesn't matter 15:39 sfan5 you need to handle the condition being false because the documentationm says that you always need to return a number 15:39 sfan5 why that happens is secondary, the error happens because your function does not confirm to the documentation 18:03 Out`Of`Control hi