Blue Screen while using NetBlitz wrapper

BlitzPlus Forums/BlitzPlus Bug Reports/Blue Screen while using NetBlitz wrapper

Im not sure if this goes in the bug reports, but i was using the netblitz wrapper for blitz3d (this also applies to directplay, too) and as soon as i get the two instances connected my laptop goes blue screen. Even if it is a local host this happens. This does not happen if i run the expample code that came with netblitz. I don't understand if something is wrong with my code or what?

Vista Home Premium
1.8 ghz processor
2 gb ram
integrated graphics

Network Drivers:
6TO4 Adapter
Intel Wireless Wifi Link 4965AGN
isatap.{}
Realtek RTL8101E PCI-E Fast Ethernet NIC (NDIS 6.0)


Heres the network portion of my code:

Function GUI()
	
	host=Input ("Host (1) or Join(0)")
	
	FlushKeys
	
	myname$=Input$ ("UserName= ")
	FlushKeys
	
	
	If host=1 Then     ;HOST
		
		ip$=""
		my_port=80
		
		Print "Server Created"
	Else If host=0    ;CLIENT
		
		my_port=Input$ ("Port=")
		ip$=Input$ ("Host IP >")
		
		Cls
	EndIf
	
	mainstream=StartNBGame(my_port)
	If mainstream=0 Then RuntimeError "Failed to Start Game - Port Occupied"
	
;//local player
	ID$=CreateNBPlayer$(myname$,ip$,mainstream,host)
	SetupPlayer(myname$,my_port,ID$)
	
;create server player - from pre-existing type (if client)
	If host=0 Then 
		For i.nbplayer=Each nbplayer
			SetupExternalPlayer(i\name$,i\ID$)
		Next 
	EndIf
	
	
End Function 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function Chat()
End Function

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function UpdateNetWork()
	Local msgtosend$
	
	HandleMessages()
	
	UpdateGame()         ;update everthing else
	
	If MilliSecs() - mastertime > 15000
		p.pl=First pl 
		msgtosend$=EntityX(p\cam)+"|"+EntityY(p\cam)+"|"+EntityZ(p\cam)   ;coordinates
		SendNBMsg(1,msgtosend$,0,mainstream) 
	EndIf
	
End Function

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function UpdateGame()
	
	UpdateExplosions()
	p.pl=First pl:UpdatePlayer(p\num) 
	UpdateLevel()
	
End Function 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function HandleMessages()
	Local oncoor,coor$
	
	While RecvNBMsg(mainstream)
		DebugLog NBMsgFrom$(mainstream)
		Select NBMsgtype(mainstream)
				
			Case 100    ;player has joined
				serverid$ = converttoid$(serverip,serverport)
				DebugLog "new player recognized..."
				If nbuserid$=serverid$ Then
					CheckNBDatabase(mainstream)
				Else If nbuserid$<>serverID$
				;create new NB player
					i.nbplayer=New nbplayer
					i\name = nbmsgdata$(mainstream)
					i\ip = nbmsgip(mainstream)
					i\port = nbmsgport(mainstream)
					i\id$ = converttoid$(i\ip,i\port)
				EndIf
			;create "Real" player
				SetupExternalPlayer(nbmsgdata$(mainstream),nbmsgfrom$(mainstream))
				WB3D_Notify("Player "+nbmsgdata$(mainstream)+" has joined","New Player",0)
				
			Case 101   ;player has left
				For p.pl=Each pl
					If NBmsgFrom$(mainstream)=p\ID$ Then
						WB3D_Notify("Player ID: "+p\ID$+" has left","Player Left",0)
						For i.nbplayer = Each nbplayer
							If p\ID$ = i\id$
								Delete i :Exit
							EndIf
						Next
						Delete p
						Exit
					EndIf
				Next
			Case 200
				RuntimeError "Host has left or been terminated"
				
			Case 1  ;coordinates packet
				DebugLog "Message Recieved from: "+NBmsgFrom$(mainstream)
				
				coor$=NBmsgData$(mainstream)
				DebugLog coor$ 
				sendID$=NBmsgFrom$(mainstream)
				newx=Int(gettok$(coor$,1,"|"))  ;//convert to integers
				newy=Int(gettok$(coor$,2,"|"))
				newz=Int(gettok$(coor$,3,"|")) 
				DebugLog newx
				DebugLog newy
				DebugLog newz
				
			;associate coordinates with correct player
				For p.pl=Each pl
					If p\ID$=sendID$ Then
						PositionEntity p\cam,newx,newy,newz
						Return 
					EndIf 
				Next
				
			Case 2  ;new weapon fired
				datawep$=NBMsgData$(mainstream)
				Select gettok$(datawep$,1,"|")
					Case "FireBullet"
						CreateNew_FireBullet(Int(gettok$(datawep$,2,"|")),Int(gettok$(datawep$,3,"|")),Int(gettok$(datawep$,4,"|")),Int(gettok$(datawep$,5,"|")),Int(gettok$(datawep$,6,"|")),Int(gettok$(datawep$,7,"|")))
						
					Case "FireColumn"
						CreateNew_FireColumn(Int(gettok$(datawep$,2,"|")),Int(gettok$(datawep$,3,"|")),Int(gettok$(datawep$,4,"|")),Int(gettok$(datawep$,5,"|")))
				End Select 
				
		End Select
		
	Wend 
	
End Function

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function SetupExternalPlayer(name$,ID_num$)
	
	p.pl=New pl
	p\cam=CreateCamera()   ;The "Cam" is actually the marker for the other player
	CameraProjMode p\cam,0 
	p\mark=CreateCube(p\cam) ;the mark is a distortion cube parented to the cam
	ScaleEntity p\mark,15,30,15
	PositionEntity p\mark,EntityX(p\cam),EntityY(p\cam),EntityZ(p\cam)
	p\num=2
	p\lockmouse=1
;EntityType p\cam,COLLISIONTYPE_PLAYER
	EntityRadius p\cam,32
	
	p\name$=name$
	p\ID$=ID_num$
	
End Function

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function Find_pdata.pl (ID)
	For p.pl = Each pl
		If p\ID = ID Then Return p
	Next
End Function

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function gettok$(from$,which,space$=" ")
	Local foundword=False
	Local mode=False
	Local current=0
	Local maketok$=""
	Local getchar$=""
	For i=1 To Len(from$)
		getchar$=Mid$(from$,i,1)
		If foundword=False Then
			If mode=False Then
				If getchar$<>space$ Then
					mode=True
					current=current+1
				End If
				If current=which Then
					foundword=True
					maketok$=maketok$+getchar$
				End If
			Else
				If getchar$=space$ Then
					mode=False
				End If
			End If
		Else
			If getchar$=space$ Then
				Exit
			Else
				maketok$=maketok$+getchar$
			End If
		End If
	Next
	Return maketok$
End Function



oops. this is supposed to be in bliz3d bug reports! Sorry, but could someone move it?