Page 1 of 1

decholink and table.insert

Posted: Sun Jul 01, 2018 9:21 pm
by Dyron
I've been reading the forums and I found out how to make decholink send something but I want to be able to make it add to a table.

Example Code:

Code: Select all

function killadd()
	
	MissingMobs = {"a giant bear", "a small octi", "your momma"}
	TestingMobs = {}
	
	for _,v in ipairs(MissingMobs) do
		if not table.contains(KillMobs, v) then
			dechoLink("<50,50,0:0,255,0>Add " .. v, [[table.insert(TestingMobs, v)]], "This will add " .. v .. " to your list of killable mobs.", true)
			print("\n")
		end
	end
	
	display(TestingMobs)
		
end
I can make a send work but I can't make a table.insert work. I show that Vadi said that it'd help to make functions work here but I tried using a function as well and it didn't work.

Is there a way to go about doing this?

Re: decholink and table.insert

Posted: Mon Jul 02, 2018 1:27 am
by Dyron
Nevermind, I got it working by using expandAlias and just using an alias. Works well enough.