1. Please use [code]code here...[/code] tags when posting code.
2. Post error and code as text, not screenshots.
This code will work:
Sub Process_Globals
Type Type_Sys1(serial1 As Serial)
Public Sys1 As Type_Sys1
Private serial As Serial
End Sub
Private Sub AppStart
Sys1.serial1 = serial
Sys1.serial1.Initialize(115200)
Log("AppStart")
End Sub
Sys1.serial is a pointer to a Serial object. When you declared Sys1 as a global variable, the compiler only allocated the memory required for the structure.
It didn't create a Serial object (it can't). So the only way to use custom types with non-numeric fields is by assigning them yourself in the code above.