Thread Tools Display Modes
08-18-08, 12:48 AM   #1
thet3rminat0r
A Deviate Faerie Dragon
Join Date: Aug 2008
Posts: 10
input tables in chat messages

is it possible to put table entry's into channel messages? i am not able to get it to print out but i can get data to go into a table

Code:
elseif (event == "CHAT_MSG_CHANNEL") then
		local channel = tonumber(strsub(arg4,1,1));
		ccvars.cnames[channel] = strsub(arg4,4);
		CCAddMsgCustom(channel, "["..arg4.."]["..arg2.."]: "..arg1);
	end
Code:
function CCAddMsgCustom(channel,msg)
	tinsert(cccustomchannels[channel],1,msg);
	--CopyTable(cccustomchannels[channel],1,msg)
	SendChatMessage("{cccustomchannels[channel],1,msg}", CHANNEL, "Orcish", "guildtest");
	sendChatMessage("{cccustomchannels[channel],1,msg}", CHANNEL, "Orcish", "/6");
	--table.foreach({cccustomchannels[channel],1,msg}, print: testing);
	if (ccvars.memorylimit>0 and getn(ccsye)>ccvars.memorylimit) then
		tremove(cccustomchannels[channel], ccvars.memorylimit+1);
	end
end
the last set of code is a test by me, tinsert puts the message into a table but i cannot get it in the same move to take what was in now in that table and put it in another channel. when i go sendChatMessage("{cccustomchannels[channel],1,msg}", CHANNEL, "Orcish", "/6"); it comes up with a nil value, when i go SendChatMessage("{cccustomchannels[channel],1,msg}", CHANNEL, "Orcish", "guildtest"); it doesnt come up with any error or ANYTHING at all. and yes i am in a channel and all appropriate channels have been registered.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » input tables in chat messages


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off