Error on using RGBtoColourName

Posted by Zetsukaze on Tue 05 Jul 2011 03:42 AM — 3 posts, 17,731 views.

Singapore #0
I'm using a trigger

<trigger
group="raceWalk"
match="^(\w+) enters the room\.$"
omit_from_output="y"
regexp="y"
send_to="14"
sequence="1"
>
<send>
.
.
.
for k,v in ipairs(TriggerStyleRuns) do
ColourTell(RGBtoColourName(v.textcolour), RGBtoColourName(v.backcolour), v.text)

end
</send>
</trigger>

and I get a runtime error of

[string "Trigger: "]:17: attempt to call global 'RGBtoColourName' (a nil value)

Anyone have any idea why? Another plugin that I have uses the same piece of code and runs fine.

The line I trigger on goes something like He enters the room. I colour it if the wildcard fits my friend list, and if not its supposed to reproduce the same colour.
USA #1
It's "RGBColourToName".

Template:function=RGBColourToName
RGBColourToName

The documentation for the RGBColourToName script function is available online. It is also in the MUSHclient help file.

Singapore #2
Wow thanks, I copied that bit off someone else who posted here =D