Moderators: They make you lose count(Longest thread still alive!)

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
27 why does player.getPlayerName() decrease the nanobots inside a player? That just seems stupid >_<
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
29 for those that will say the obvious which is "then just don't care about someone's username"
I kind of need to use that function as to be able to use functions on a player I need to
local entitiyIdList= antenna.getInfectedEntities()
local entities
local correctPlayer
for key,value in pairs(entityIdList) do
entities[]=antenna.getInfectedEntitiy(value)
end
for entity, likeICare in pairs (entities) do
if(entity.getPlayerName()=="some player name) then
correctPlayer=value
--Finally we know if this is indeed the player we want, also this code assumes there is no way a non player entity can get infected, if that is possible you also need to check for that first which means that yet another nanobot will die.
end