irgendwie wollen meine geschriebenen scripts mal wieder nicht -.-
Lua
function team_chat ( player, command,...)
local chatTable = (...)
local text = table.concat(chatTable," ")
local Fraktion = getElementData(player,"fraktion")
local Rank = getElementData(player,"rang")
if not Fraktion == 0 then
local players = getElementsByType("player")
for key,fplayer in ipairs(players) do
if getElementData(fplayer,"fraktion") then
if getElementData(fplayer,"fraktion") == Fraktion then
outputChatBox(Rank.." : "..text)
end
end
end
else
outputChatBox("Du bist in keiner Fraktion!",player,255,0,0)
end
end
addCommandHandler("tchat",team_chat)
Alles anzeigen
fehler:
zeile 3 bad argument #1 to cancat <table expected, got string>