For some reason this keeps freezing the host, but not the client, any clues? I think it has something to do with the mesh, because when I take it out it works...
I've tried using a cube, even a pivot in it's place, but to no avail. I also tried restricting the Entity to an interger (%).
Also, to note, something else odd is when I move creating a "New" type for the object to the bottom of the code it gives me a memory access error (even though I have a globalized type at the beginning). Again, it does not give the same error on the client (even though the type and the entity are both still created).
[CODE]
Function SN_CreateObject( MsgData$ )
IDStart=(Instr(MsgData$,"*"))+1 ;Beginning
IDEnd=(Instr(MsgData$,"M=")) ;End
IDLength=IDEnd-IDStart ;Length
TID%=Int(Mid$(MsgData$,IDStart,IDLength)) ;Set Variable
If TID%<>0
SN_NObj.SN_Object = New SN_Object
SN_NObj\ID%=TID%
;Parse Mesh
MStart=(Instr(MsgData$,"M="))+2
MEnd=(Instr(MsgData$,"N="))
MLength=MEnd-MStart
SN_NObj\Mesh$=Mid$(MsgData$,MStart,MLength)
DebugLog.Print SN_NObj\Mesh$
SN_NObj\Entity%=LoadMesh( SN_NObj\Mesh$ ) ;Load The Mesh
;HideEntity SN_NObj\Entity ;Hide it until ready for use
;Parse Name
NStart=(Instr(MsgData$,"N="))+2
NEnd=(Instr(MsgData$,"&"))
NLength=NEnd-NStart
SN_NObj\Name$=Mid$(MsgData$,NStart,NLength)
EndIf
End Function
[/CODE]
I've tried using a cube, even a pivot in it's place, but to no avail. I also tried restricting the Entity to an interger (%).
Also, to note, something else odd is when I move creating a "New" type for the object to the bottom of the code it gives me a memory access error (even though I have a globalized type at the beginning). Again, it does not give the same error on the client (even though the type and the entity are both still created).
[CODE]
Function SN_CreateObject( MsgData$ )
IDStart=(Instr(MsgData$,"*"))+1 ;Beginning
IDEnd=(Instr(MsgData$,"M=")) ;End
IDLength=IDEnd-IDStart ;Length
TID%=Int(Mid$(MsgData$,IDStart,IDLength)) ;Set Variable
If TID%<>0
SN_NObj.SN_Object = New SN_Object
SN_NObj\ID%=TID%
;Parse Mesh
MStart=(Instr(MsgData$,"M="))+2
MEnd=(Instr(MsgData$,"N="))
MLength=MEnd-MStart
SN_NObj\Mesh$=Mid$(MsgData$,MStart,MLength)
DebugLog.Print SN_NObj\Mesh$
SN_NObj\Entity%=LoadMesh( SN_NObj\Mesh$ ) ;Load The Mesh
;HideEntity SN_NObj\Entity ;Hide it until ready for use
;Parse Name
NStart=(Instr(MsgData$,"N="))+2
NEnd=(Instr(MsgData$,"&"))
NLength=NEnd-NStart
SN_NObj\Name$=Mid$(MsgData$,NStart,NLength)
EndIf
End Function
[/CODE]