I have this portion of the code:
Code: Select all
if(input ~= "") then
for i,v in pairs(Spring.GetTeamList()) do
if v > 0 then -- a check because for some reason when i = 1, then v = 0 and teamID = nil
local teamID = Spring.GetTeamList()[v]
for j,k in pairs(Spring.GetTeamUnits(teamID)) do --k is unitID
if k > 0 then --a check similar to above
_,playerID,_,_,_,_,_,_=Spring.GetTeamInfo(teamID)
playername,_,_,_,_,_,_,_,_,_=Spring.GetPlayerInfo(playerID)
end
end
end
end
Spring.SendLuaUIMsg(msgbox.." Playername;"..playername..";Answer "..counter..";".." "..input)
end
Does anyone know what I am doing wrong?
It works once before, but it doesn't now.
I am connecting the 2 laptops through wireless.