Page 1 of 1

clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 1:34 am
by Dedicated
I have been getting the error:

<[string "peopleHere = peopleHere or {}..."]:30: attempt to call method 'EchoLink' (a nil value)>

what im trying to do is make a 'who here' miniconsole and make anyone appended to that list targeted by clicking on them with this code:

function whoHereAdd()
clearUserWindow("nameBox")
table.remove(peopleHere)
for k, v in ipairs (peopleHere) do
nameBox:EchoLink( "(" .. v .. ")\n", [[expandAlias("target ]]..v..[[") printTargetWindow()]], "Target " .. v, true, false )
end
end

line 30 is the nameBox:EchoLink(), what do I need to do?

Re: clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 1:46 am
by Lezard
<[string "peopleHere = peopleHere or {}..."]:30: attempt to call method 'EchoLink' (a nil value)>
Basically what that is saying is that it's attempting to call the function EchoLink, a nil value, meaning it doesn't exist.

EchoLink should be echoLink
Look here.

Re: clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 1:47 am
by Dedicated
I tried both, neither work

Re: clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 1:51 am
by Lezard
the format should be:
echoLink([windowName], text, command, hint, [bool use_current_format or defaultLinkFormat])

So the code should look like:
echoLink("nameBox", "(" .. v .. ")\n", [[expandAlias("target ]]..v..[[") printTargetWindow()]], "Target " .. v, true, false )

Re: clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 1:55 am
by Dedicated
does that hold true when Im working with a geyser miniconsole? cause currently Im using:

nameBox:echo( "(" .. v .. ")\n", [[expandAlias("target ]]..v..[[") printTargetWindow()]], "Target " .. v, true, false )

and that works just fine aside from not making the names a link

Re: clickable 'who here' miniconsole HELP!

Posted: Mon Dec 03, 2012 2:03 am
by Lezard
For geyser you use setClickCallback()