Types confuse me in MAX

BlitzMax Forums/BlitzMax Beginners Area/Types confuse me in MAX

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.

Simply put, there is no definition for r globally

Here (since I wasn't exactly sure what all the field were for and what not, I optimized it a bit based on your general code):
Global R:Radio
Type Radio
	Const S_Radio:int=1
	Const U_Radio:int=0
	
	Global RLST:TList
	Global T_Radio:int
	Global G_Radio:TImage
	
	Field ID:Int
	Field State:Int
	Field X:int,Y:Int
	
	Method Update()
	     If G_Radio <> null then DrawImage(g_radio,x,y,state)
	End Method

	Function Create:Radio(X1:int,Y1:int)
        	Local R:Radio
		if RLST = null then RLST = createlist()
		R = New Radio
		State = U_Radio
		ID = T_Radio+1
		X=X1
		Y=Y1
		Return R
	End Function
End Type

Function CreateGUI()
	R = Radio.Create(5,5)
End Function

R.Update()