Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-25-2005, 05:00 PM
Arkan1k Arkan1k is offline
Delph
Join Date: Feb 2004
Location: Melbourne, Australia
Posts: 35
Arkan1k is on a distinguished road
Send a message via AIM to Arkan1k Send a message via MSN to Arkan1k
Exclamation Floating Point Bug

I know in newfeatures you said you fixed something to do with the floating point so it works with the Kingdoms item sorting.
Now, in any script any zeros directly trailing the decimal point are removed.
For example:
NPC Code:
if (created||timeout) {
disabledefmovement;
if (keydown(0)) val += 0.005;
elseif (keydown(2)) val -= 0.005;
setplayerprop #c,#v(val);
timeout = 0.05;
}



Place this in a level script and tap up or down. You will notice that when there should be zeros trailing the decimal place, they aren't there.

Values in 0.05 increments that I am using in scripts now have small glitches or jumps when the movement of the object should otherwise be smooth.
I'd say this is a rather big problem for the new client.
__________________
[ Delph ]
Reply With Quote
  #2  
Old 01-26-2005, 06:05 AM
Curt1zzle Curt1zzle is offline
Starting not to love you
Curt1zzle's Avatar
Join Date: Sep 2003
Posts: 3,669
Curt1zzle has a spectacular aura about
Send a message via AIM to Curt1zzle
Ouch, that's no good. Fix it for my buddy Delph!

We've got a PW to make
__________________

This message has been deleted by Sam. Reason: you should better stop it now
Reply With Quote
  #3  
Old 01-26-2005, 06:10 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
I didn't understand what you were saying at first, but I totally get what you mean

if you open the debugger you see the script is interpreted as
PHP Code:
if (keydown(0)) {
  
val val+(0.5);
}
else if (
keydown(2)) {
  
val val-(0.5);

seems very wrong....

online, clientside, my results were even stranger

from 0 to 1, it only added in 0.05 increments, but after 1 it added in 0.005 increments
__________________

Reply With Quote
  #4  
Old 01-26-2005, 07:38 AM
Arkan1k Arkan1k is offline
Delph
Join Date: Feb 2004
Location: Melbourne, Australia
Posts: 35
Arkan1k is on a distinguished road
Send a message via AIM to Arkan1k Send a message via MSN to Arkan1k
In simple terms, it removes any zeros between the decimal place and the next number higher than 0.

e.g.
0.005 becomes 0.5
13.00008 becomes 13.8
__________________
[ Delph ]
Reply With Quote
  #5  
Old 01-26-2005, 11:45 AM
Snakeandy7 Snakeandy7 is offline
"Member ID=2610"
Snakeandy7's Avatar
Join Date: Mar 2003
Posts: 987
Snakeandy7 is on a distinguished road
Yep, I found this out to, it ****ed up some Era systems. I had to change the timeout with the var...
__________________
"Freedom is best I tell thee
of all things to be won
then never live within the bond
of slavery my son".


Reply With Quote
  #6  
Old 01-27-2005, 01:46 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Fill fix it, end of the week, sorry x-x
Reply With Quote
  #7  
Old 01-29-2005, 03:45 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Fixed, download v2.31
Reply With Quote
  #8  
Old 02-08-2005, 08:31 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Stefan, there are still issues with this. An NPC with this script:

NPC Code:

if(playerenters){
test=0.01;
showtext 0,10,10,courier new,,0.01 is converted to: #v(test);
changeimgvis 0,4;
}



will display the text "0.01 is converted to: 0.1". I'm working from v2.3.1 of the standalone editor, not sure if it also occurs in the online client.
__________________
Reply With Quote
  #9  
Old 02-08-2005, 10:03 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally Posted by Kaimetsu
not sure if it also occurs in the online client.
It works fine online.
__________________

Reply With Quote
  #10  
Old 02-08-2005, 11:03 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by CheeToS2
It works fine online.
Huh, I guess the editor wasn't fully updated.
__________________
Reply With Quote
  #11  
Old 02-09-2005, 02:14 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by Kaimetsu
Huh, I guess the editor wasn't fully updated.
Hmmm the editor says version 2.31 too (if you right click)? weird
Reply With Quote
  #12  
Old 02-09-2005, 03:26 AM
Arkan1k Arkan1k is offline
Delph
Join Date: Feb 2004
Location: Melbourne, Australia
Posts: 35
Arkan1k is on a distinguished road
Send a message via AIM to Arkan1k Send a message via MSN to Arkan1k
Yes it's just the editor. As soon as I got access to an NPC Server online, the problem was gone.
__________________
[ Delph ]
Reply With Quote
  #13  
Old 02-09-2005, 03:47 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Stefan
Hmmm the editor says version 2.31 too (if you right click)?
Yep. That was the first thing I checked.
__________________
Reply With Quote
  #14  
Old 02-09-2005, 10:29 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok new version uploaded (v2.311) for the editor, it should work correctly now.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.