[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Error on using RGBtoColourName

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Error on using RGBtoColourName

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Zetsukaze   Singapore  (2 posts)  [Biography] bio
Date Tue 05 Jul 2011 03:42 AM (UTC)  quote  ]
Message
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.
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Reply #1 on Tue 05 Jul 2011 04:02 AM (UTC)  quote  ]
Message
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.


'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Zetsukaze   Singapore  (2 posts)  [Biography] bio
Date Reply #2 on Tue 05 Jul 2011 04:06 AM (UTC)  quote  ]
Message
Wow thanks, I copied that bit off someone else who posted here =D
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


715 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]