problematic types

Blitz3D Forums/Blitz3D Beginners Area/problematic types

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

I am having trouble with the types in my 3d game. I started with the template from Mak's xfighter, and have built greatly on it.


there are 2 types, cursor and Player

His code goes like this:
player1.Player=p1CreatePlayer( plane,0,0,GraphicsWidth(),GraphicsHeight(),joy )


Function p1CreatePlayer.Player( plane,vp_x,vp_y,vp_w,vp_h,ctrl_mode )
p.Player=New Player
Return p
End Function




My code goees like this:

curs.cursor = p1createcursor()


Function p1createcursor()
p1cursor.cursor = New cursor
Return p1cursor
End Function

My code comes up with an error message "illegal type conversion", while his does not. Why???