- Code: Select all
local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
That ought to work, havn't tested it. Try it yourself :3
local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
t = {steve="steve"}
tablename = "t"
for i,v in ipairs(tablename) do print(v) end
Traxie21 wrote:Topic: How does one use a string variable to refrence a table in ipairs() [ or any other thing for that matter]
Reason: I have multiple tables which are refrenced by string variables that I need to be able to use. (Ranks module for ServerXtended)
EG: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
t = {steve="steve"}
tablename = "t"
for i,v in ipairs(tablename) do print(v) end
More Info: I've tried but I can't seem to make it work.
for field_name, field_value in pairs(table)
Traxie21 wrote:Erm, I don't see how that will help here.
The error I get is this:
bad argument #1 to 'pairs' table expected, got nil
Admins = {
privs = {
"se_admin=true", "se_player=true", "homes=true"
}
}
group = "Admins"
--print(tostring(_G[group])) Works properly, gives me the table ID.
print(tostring(_G[group..'["privs"]']))
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
PilzAdam wrote:Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
PilzAdam wrote:Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Evergreen wrote:PilzAdam wrote:Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Thanks! :DTopywo wrote:Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Did you disable the texture atlas in your minetest.conf? If I don't, on redcrab my cacti-block Oracle get yellow stripes.
enable_texture_atlas = false
pandaro wrote:someone has already done an anvil? I find in that mod?
VanessaE wrote:You can't. Those are not currently texturable.
Likwid H-Craft wrote:Oh why they not then how come, they box looking but texture zero.
Yeah what have a pull request.
Likwid H-Craft wrote:Well, I hope on 0.4.5 we have the rights to change the moon and, sun and have add something minecraft don't have.
Users browsing this forum: No registered users and 5 guests