Search found 140 matches

Return to advanced search

I think your debug syntax is wrong because I tried entering something I know is working and it still doesn't return anything. I know my string.match is working which means I should be able to return drop_name. but it doesn't return.I don't know much about debug so maybe I'm wrong. Not to be rude, bu...
by wcwyes
Thu Oct 24, 2013 03:02
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

node drop

What's the proper way to get the item drop from a node on the ground?
by wcwyes
Thu Oct 24, 2013 02:34
 
Forum: WIP Mods
Topic: node drop
Replies: 3
Views: 515

where is the register chat command spawn?
by wcwyes
Thu Oct 24, 2013 00:40
 
Forum: Modding Discussion
Topic: Post your modding questions here
Replies: 3735
Views: 657734

It would be easier if I knew where to find the register.chat_command for it, Any idea where I could find it
Evergreen wrote:
wcwyes wrote:didn't see it in public. Do you know if he has a downloadable copy or how to immatate it?, I haven't even been able to figure out where /spawn is referenced.
Evergreen wrote:Pfft, that's easy. Ever played on redcrab's server? /spawn just teleports you, no need for dying here.
I don't think he does, but it shouldn't be too hard to make.
by wcwyes
Wed Oct 23, 2013 03:35
 
Forum: Modding Discussion
Topic: Post your modding questions here
Replies: 3735
Views: 657734

Not to be rude, but did you ever inserted any debug prints in order to find out what your script is doing? I suggest you put this in, because i think its the problem: any other ideas? if mode==1 then local pos = minetest.get_pointed_thing_position(pointed_thing, under) local node = minetest.env:get...
by wcwyes
Wed Oct 23, 2013 00:46
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

didn't see it in public. Do you know if he has a downloadable copy or how to immatate it?, I haven't even been able to figure out where /spawn is referenced. any idea how to make /spawn not kill you? Pfft, that's easy. Ever played on redcrab's server? /spawn just teleports you, no need for dying her...
by wcwyes
Wed Oct 23, 2013 00:36
 
Forum: Modding Discussion
Topic: Post your modding questions here
Replies: 3735
Views: 657734

Sounds pretty cool, thanks for the help you did give I haven't worked with detached inventories or the players inventory much but I think I see something that might cause an issue, not sure if it is correct usage or not. The line below has a colon after suitcase. Shouldn't it just be suitcase? if dr...
by wcwyes
Tue Oct 22, 2013 04:32
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

any idea how to make /spawn not kill you?
by wcwyes
Tue Oct 22, 2013 03:04
 
Forum: Modding Discussion
Topic: Post your modding questions here
Replies: 3735
Views: 657734

What about the references to the item drop do you think I'll be ok there? I haven't worked with detached inventories or the players inventory much but I think I see something that might cause an issue, not sure if it is correct usage or not. The line below has a colon after suitcase. Shouldn't it ju...
by wcwyes
Tue Oct 22, 2013 01:02
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I did but they didn't return, I also entered the debug that you suggested and it returned Checking if the type of bag1_inv: Not to be rude, but did you ever inserted any debug prints in order to find out what your script is doing? I suggest you put this in, because i think its the problem: if drop_n...
by wcwyes
Mon Oct 21, 2013 19:31
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

The colon emphasizes that it's anything from the mod name I haven't worked with detached inventories or the players inventory much but I think I see something that might cause an issue, not sure if it is correct usage or not. The line below has a colon after suitcase. Shouldn't it just be suitcase? ...
by wcwyes
Mon Oct 21, 2013 13:10
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I believe you're right I think I was using above to check for air and what not, tried it but it's still not adding the suitcase to bag slot one so there must be another problem too, but thanks for that reminder. Went ahead and changed it. Trying to reverse the process now I tried adding the suitcase...
by wcwyes
Mon Oct 21, 2013 04:09
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

Trying to reverse the process now I tried adding the suitcase back to the bag1 slot using if mode==1 then local pos = minetest.get_pointed_thing_position(pointed_thing, above) local node = minetest.env:get_node(pos) local node_name = node.name local drop_name == minetest.registered_nodes[node_name]....
by wcwyes
Sun Oct 20, 2013 21:43
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

works great I must have implemented it wrong when I tried to implement it. Thanks for the help. Ok, although i totally dislike doing this, tell me how the following code behaves. if mode==1 then local bag1_stack = user:get_inventory():get_stack("bag1",1) local suitcase_name = bag1_stack:get_name() i...
by wcwyes
Sun Oct 20, 2013 00:03
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

this is the extent of my code and it works fine at what I was trying. It places a suitcase with the node name associated with it, it moves all of the inventory over I just need a line/argument/function to finish it and remove the item(what ever it may be) from bag1. NOTE: mode==1 is on_use if mode==...
by wcwyes
Sat Oct 19, 2013 19:28
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I tried chaning everything accordingly and it still didn't work, I was referring to your minetest version. Minetest 4.8 handles things alot different than 4.7. My server owner won't goto 4.8 until it is stable. So I'm writing this for 4.7. I tried my code as single mod, so put this code in a init.lu...
by wcwyes
Sat Oct 19, 2013 19:08
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I attemted to impliment your code as a self acting fuction but it doesn't seem to do anything. Try to put the code in a tool on use, there's no need for me to test your code because it still doesn't serve the purpose I need. Im sorry, but im afraid that i am right. The inventory you were trying to a...
by wcwyes
Sat Oct 19, 2013 01:22
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

And thats what i meant by my previous post. You are currently working on the 'bagcontents' itself and want to delete the bag as a item from the inventory slot shown in the unified inventory when clicking on the Bag icon in the bottom. While your metadata code works well, since you are in the correc...
by wcwyes
Fri Oct 18, 2013 17:55
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

Im sorry, my bad. Got the wrong case. Anyway, i read a bit through the unified inventory and stumbled over something. You tried to access the inventory list bag1 from the player inventory. But it seems the bags themself are not stored as bag1 bag2 bagn [..] but within the inventory list '<player na...
by wcwyes
Fri Oct 18, 2013 04:30
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I suggest that you set some debug info. Like what name is printing 'suitcase_name'. It might be possible that you are even getting a nil value here, if your bag has more than one inventory slot and you didn't put the item in the first index. Since thats the only indexing your asking for in your cod...
by wcwyes
Thu Oct 17, 2013 18:27
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I assume meta is defined, and so is "nodename" and "amount". you make a good point so I tried local bag1_stack = user:get_inventory():get_stack("bag1",1) local suitcase_name = bag1_stack:get_name() user:get_inventory():remove_item("bag1", {name=suitcase_name.." "..1}) but it still did nothing at le...
by wcwyes
Thu Oct 17, 2013 17:25
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I also tried this which didn't work at all.
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
user:get_inventory():remove_item("main", meta:get_string("nodename") .. " " .. meta:get_string("amount"))
by wcwyes
Thu Oct 17, 2013 04:20
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I got it to remove the suitcase from bag1 by adding this to the end before return itemstack, but for it to take effect I have to log out and log back in. Any suggestions?
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
user:get_inventory():set_stack("bag1",1, Empty)
by wcwyes
Wed Oct 16, 2013 20:04
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

how do I remove the item from bag 1?
by wcwyes
Tue Oct 15, 2013 00:52
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

thanks works great
by wcwyes
Tue Oct 15, 2013 00:09
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I've got it transferring the data but, it won't show player inventory(I feel like there's a better way to do it too) local S if minetest.get_modpath("intllib")) then dofile(minetest.get_modpath("initllib").."/initllib.lua") S = initllib.Getter(minetest.get_current_modname()) else S = function ( s ) ...
by wcwyes
Mon Oct 14, 2013 02:37
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

--assumes that bag1 list is of size 1,1 in the formspec local bag1_stack = user:get_inventory():get_stack("bag1",1) local suitcase_name = bag1_stack:get_name() if string.match(suitcase_name,"suitcase:") then --code to place node and add metadata end thanks it works great if mode==1 then local bag1_...
by wcwyes
Sun Oct 13, 2013 02:17
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

the reason I don't show all of my code is because there's still alot of unnecessary screwdriver code left in the code, but I'll give you this. minetest.register_tool("suitcase:briefcase", { description = "Briefcase", inventory_image = "briefcase.png", on_use = function(itemstack, user, pointed_thing...
by wcwyes
Sat Oct 12, 2013 23:34
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I've already made the individual tool/nodes https://scontent-b-dfw.xx.fbcdn.net/hphotos-prn1/v/1241327_10201179085972019_1997570415_n.jpg?oh=dd51c3320dc1e1c8f032f2f05d749865&oe=525B6D29 Cool, figured out how to do what you were wanting? Should be able to be done. I haven't figured out the next step...
by wcwyes
Sat Oct 12, 2013 21:36
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739

I've already made the individual tool/nodes Image
by wcwyes
Sat Oct 12, 2013 17:56
 
Forum: WIP Mods
Topic: meta data help
Replies: 54
Views: 8739
PreviousNext

Return to advanced search