Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / String characters as integers
  RSS 2.0 ATOM  

String characters as integers
Rate this thread
 
32584
 
Permlink of this thread  
avatar
  • Kenc
  • Posted: 29 July 2009 05:45 AM
  • Total Posts: 66
  • Joined: 15 February 2007 04:09 PM

I came across this oddity while testing classof a string. Copied and pasted from MXS listener

“A” as integer
undefined
“P” as integer
0
“L” as integer
0
“X” as integer
undefined

They all should reply undefined. What’s going on here?



Replies: 0
avatar

From the maxscript Help:

bit.intAsHex will append an “L” to the output string for Integer64 inputs, and a “P” for IntegerPtr inputs.

bit.hexAsInt will output a Integer64 in the input string contains an “L”, a IntegerPtr if it contains a “P”.

My guess is since they are part of the bit number values it returns them as 0.0 when not part of a bit hex to integer, or vice versa, conversion.

-Eric



Eric Craft
“The Evil Monkey hiding in your closet.”

Replies: 0
avatar
  • Kenc
  • Posted: 29 July 2009 08:55 AM

I’ve never dealt with the ‘bit’ before and I would not have figured it out myself. Thanks so much for the help.



Replies: 0