Aloha, da outputChatBox es nur ermöglicht Nachrichten mit maximal 128 Zeichen abzusenden dachte
ich mir dass es einfacher wäre eine Nachricht die länger ist nach 128 Zeichen abzutrennen und den Rest in weiteren Nachrichten abzusenden.
Dies funktioniert clientseitig ohne Probleme, serverseitig hapert es jedoch noch etwas, da mit der folgenden Funktion und einem gewöhnlichen "Lorem ipsum"-Blindtext keine Meldung ausgegeben wird.
Clientseitig funktioniert das ganze wie bereits gesagt ohne Probleme und es lassens ich somit auch längere Nachrichten absenden.
Fällt jemandem zufällig auf woran es liegen kann?
Lua
_outputChatBox = outputChatBox;
function outputChatBox (text, element, r, g, b, colorCoded)
if not text then return outputDebugString("No Text for outputChatBox", 1) end;
if not element then return outputDebugString("No Element for outputChatBox", 1) end;
if getElementType(element) ~= "player" then return outputDebugString("No Element for outputChatBox", 1) end;
if not r then
local r = 255;
end
if not g then
local g = 255;
end
if not b then
local b = 255;
end
if not colorCoded then
local colorCoded = false;
end
local count = 0;
while(count < string.len(text)) do
_outputChatBox(string.sub(text,count,128), element, r, g, b, colorCoded)
count = count+128
end
end
Alles anzeigen