clickable 'who here' miniconsole HELP!

Post Reply
Dedicated
Posts: 3
Joined: Fri Nov 30, 2012 5:09 pm

clickable 'who here' miniconsole HELP!

Post 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?

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: clickable 'who here' miniconsole HELP!

Post 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.
Last edited by Lezard on Mon Dec 03, 2012 1:48 am, edited 1 time in total.

Dedicated
Posts: 3
Joined: Fri Nov 30, 2012 5:09 pm

Re: clickable 'who here' miniconsole HELP!

Post by Dedicated »

I tried both, neither work

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: clickable 'who here' miniconsole HELP!

Post 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 )

Dedicated
Posts: 3
Joined: Fri Nov 30, 2012 5:09 pm

Re: clickable 'who here' miniconsole HELP!

Post 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

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: clickable 'who here' miniconsole HELP!

Post by Lezard »

For geyser you use setClickCallback()

Post Reply