vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Sat May 18, 2013 11:13 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Long and CInt
PostPosted: Fri Mar 23, 2007 9:09 pm 
Source Code Swashbuckler

Joined: Wed Mar 07, 2007 3:03 pm
Posts: 39
Location: Argentina - Buenos Aires
I was testing with some index, and the variable GrhIndex is Long so mi index like 70k its ok but When the client or the mapeditor load the Body.dat uses CInt, so its overflows

You have to search for all the lines of Engine_Init_Grh and change the Cint for CLng

Ex:
Engine_Init_Grh BodyData(LoopC).Walk(j), CInt(Var_Get(DataPath & "Body.dat", Str$(LoopC), Str$(j))), 0

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 9:12 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Thanks. Theres some instances where Grhs are still referenced as ints from when they were ints.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 25, 2007 10:45 am 
Bit Baby

Joined: Tue Jul 25, 2006 4:00 pm
Posts: 389
Location: NJ, USA
Well i haven't actually tested this but I'm pretty positive that using integer division would be faster than cint or clng, and I believe it works the same for both

Ex:
Engine_Init_Grh BodyData(LoopC).Walk(j), Var_Get(DataPath & "Body.dat", Str$(LoopC), Str$(j)) \ 1, 0


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 25, 2007 10:56 am 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Could be, but I'm not really worried about it. It's a tiny fraction of a millisecond difference, and is done at runtime. :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group