decholink and table.insert

Post Reply
Dyron
Posts: 14
Joined: Thu Jul 28, 2016 5:02 pm

decholink and table.insert

Post by Dyron » Sun Jul 01, 2018 9:21 pm

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?

Dyron
Posts: 14
Joined: Thu Jul 28, 2016 5:02 pm

Re: decholink and table.insert

Post by Dyron » Mon Jul 02, 2018 1:27 am

Nevermind, I got it working by using expandAlias and just using an alias. Works well enough.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests