Byte Ptr to Type...how?

BlitzMax Forums/BlitzMax Programming/Byte Ptr to Type...how?

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.

The problem is the assignment of the new object to tt.

You need to do something like this :-

Function CreateTestType:testtype( ls )
Local tt:testtype = new testtype
inta = lua_newuserdata(ls, SizeOf(testtype))
Return tt
End Function

tt = CreateTestType()