View Single Post
  #30  
Unread 03-04-2005, 03:28 PM
Kosmos's Avatar
Kosmos Kosmos is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Lucan DLere
Posts: 581
Default

Quote:
OnPress="somevalue=(Some math thing that results in the number 2)"

The first will execute /happy instead of /mood happy because /happy is a command. No known way to work around this.

If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago.

I just had some real fun with this! Check the release section for the MainHUD.PerformancePanel mod for more details.

But this main thing is that if you are working with numbers on OnEvents.
Always. Always. Use Decimals. If you use decimal values you will not get the error in your chat window. It was causing some really freaky behavior with some things that was very hard to figure out. Some of the numbers would work and some wouldn't.. I tried switching the ones in my file that were causing the errors to decimal number, but that wouldn't fix the problem.
like r_light_priority=1 to r_light_priority=1.0 But that didn't fix it.
The reason was because there were OTHER numbers in the Event that would cause the error then. Once I changed ALL of them, the problem went away.

So, if you are getting those errors, throw a decimal in and you should be fine.
Reply With Quote