|
anylo Beginner
Joined: 21 Feb 2001 Posts: 28 Location: Finland
|
Posted: Wed Jan 15, 2003 10:00 am
[6.40] Floats and integers |
I'm trying to convert some ints into floats.
#show %eval(%float(1) / %float(3)) gives 1,0,0 instead of 0.33.
Am I doing something wrong or is this a bug related to locales? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jan 15, 2003 12:50 pm |
Could be a bug. The same code give 0.33 for me. Try e-mailing Zugg.
Kjata |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Jan 16, 2003 12:54 am |
quote:
Could be a bug. The same code give 0.33 for me. Try e-mailing Zugg.
Kjata
Yeah, it was already noted at one point right before 6.40 came out. Zugg is actually using a decimal in some places while using regional settings in other places or something along those lines. Since the regional settings don't match, a different route through the parser is taken.
li'l shmoe of Dragon's Gate MUD |
|
|
|
kymon Novice
Joined: 29 Jan 2003 Posts: 40
|
Posted: Tue Mar 11, 2003 5:38 pm |
it seems i have the same prob:
#math a %float(5)/3
#show @a
it says 0
#show %float(5)
5,0
i'm using zmud 6.40, german windows xp
just tried %eval(%float(1) / %float(3)),
and it also says 1,0,0
is this fixed in the beta yet? or is there any workaround? |
|
|
|
kymon Novice
Joined: 29 Jan 2003 Posts: 40
|
Posted: Wed Mar 12, 2003 7:46 am |
as a workaround, i changed my regional settings in windows. the drawback is that ALL programs now use this "weird" way of displaying numbers.
for the german folks having the same problem (only tested in win xp):
"Klicken Sie zum Öffnen von Regions- und Sprachoptionen auf Start, klicken Sie auf Systemsteuerung, und doppelklicken Sie dann auf Regions- und Sprachoptionen." (quote from windows help system)
then click on "Anpassen", and change
"Dezimaltrennzeichen" to "." and "Symbol für Zifferngruppiering" to "," |
|
|
|
|
|