Forcing a value into an object holder

BlitzPlus Forums/BlitzPlus Programming/Forcing a value into an object holder

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Howdy!

Heres my dilema:


type GameObject

field x, y

end type

global gameobj.GameObject = new GameObject

debuglog int(gameobj)


debuglog displays a value ie "1243456", if you dont create a new game object debuglog displays "0", so Im assuming int(type) returns a handle (pointer) to that object. But Ive got a problem, so Im hoping sombody can help. I want to know if I can force a value in to gameobj. The following lines of code cause me compalation errors:

gameobj = 123456
gameobj = gameobj(123456)
gameobj = int(123456)

and basicly Im all out of ideas, any help greatly appriated! (im currently using blitz 2d, but Ive got blitz + as well)

ta

Mr Brine