Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Tue Aug 02, 2011 5:23 pm   

Integer Overflow
 
I got the following error message:

Quote:
Overflow while converting variant of type (Int64) to type (Integer).


when entering a value of 1050050009 for a newly created integer variable. I see from the help file that CMUD 3.34 supports 64-bit integers (yes, I am using a 64-bit OS). Should I presume that only AutoType variables are 64-bit, and Integers are not? If that's the case, am I going to have a problem using %roomint() with a value that requires 35 bits, and is AutoTyped, rather than an actual Integer?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 02, 2011 9:10 pm   
 
CMud itself uses 64-bit integers. I don't think it lets the user use 64-bit integers, or at least doesn't let us use them in all cases.
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Aug 02, 2011 9:13 pm   
 
I wasn't able to get the error message. Can you give me an exact step-by-step for getting that error?

The mapper uses SQLite which *should* allow for 64-bit numbers in the room UserInt field, but you'll have to try it to see if it works. AutoType variables are stored as string values, but the Int field for Integers does use Int64, so it sounds like the error message is coming from some sort of conversion elsewhere in CMUD that doesn't handle 64-bit properly. If you help me narrow it down I should be able to fix it.
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Tue Aug 02, 2011 9:28 pm   
 
I duplicated the error thusly: In Package Explorer, make a new var. Select Integer Type. Enter 15000500009 for value. Save.

Running Win7 64-bit.

I'll experiment with large integers as UserInt shortly.

If anyone is wondering why I want such large values for UserInt, it's to implement a relative-position room numbering system so the automap can show contents of nearyby rooms, which is sent by the server. Three dimensions, and allowing for a large map with multiple zones, without worrying about having to potentially renumber all the rooms someday when I run out of numbers.
1500050009 = zone 1, center east/west, center north/south 4 levels up from center up/down.
2499950014 = zone 2, 1 room W from center, 1 room N from center, 1 level below center up/down.

I'd rather not use the room flags for this, as I have other plans for that field and don't want to parse the string every time I need the relational room number, which will be often.
Reply with quote
orphean
Apprentice


Joined: 21 Oct 2008
Posts: 147
Location: Olympia, WA

PostPosted: Tue Aug 02, 2011 10:25 pm   
 
I can reproduce in CMUD Pro 3.34
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Tue Aug 02, 2011 10:28 pm   
 
I'm also using Pro 3.34
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Aug 02, 2011 10:39 pm   
 
Yeah, I get the same thing in cmud 3.34, non-pro.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Aug 03, 2011 4:18 pm   
 
OK, got it. Added to bug list.
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Wed Aug 03, 2011 6:09 pm   
 
Confirmed that the mapper allows 64-bit autotype values for UserInt.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net