Sockets Streams and if Readavail
BlitzMax Forums/BlitzMax Beginners Area/Sockets Streams and if Readavail| 
 | ||
| So I have a server created and am trying to read incoming lines. in old blitz where the "???" is in the code above I could easily check to see if the player had sent anything by simply doing: if readvail(this_player\stream) > 1 In Blitzmax there does not seem to be an equivalent and I have been unable to get socketreadavail to work in any fashion. | 
| 
 | ||
| this works... sort of, it only reads every other line sent for some reason | 
| 
 | ||
| You are calling ReadLine$(this_player.stream) twice. I think you want something like Local msg:String = ReadLine$(this_player.stream) If Len(msg) > 0 Print msg End If | 
| 
 | ||
| Thanks works perfectly. I probably should have caught that =P |