Cant get full string to print out

Just starting out? Need help? Post your questions and find answers here.
netmon
User
User
Posts: 12
Joined: Sun Jul 27, 2003 4:29 pm

Cant get full string to print out

Post by netmon »

I have used SendNetworkStirng command to send a 31 byte long string, something like a$ = "skfjlskdf kj flsk jdf "+str(TotalClients)+" dfkdjf" just and example. anyway when the client reads this in with receivenetworkdata i get the proper about of bytes read in but when i use peeks on the databuffer i can only see the first 8 letters + an odd one and nothing else.

I am doing this in a select case after getting the serverevent. I gotta be missing something.

** I used debug and for some strange reason the full string comes out.. but doesnt work right with debug off. yet another test, debug on still doesnt get the full string.. it worked with 26 bytes but not 31.
netmon
User
User
Posts: 12
Joined: Sun Jul 27, 2003 4:29 pm

Duh!

Post by netmon »

Duh! figured it out..

DataBuffer = AllocateMemory(1,2000,0)

result = ReceiveNetworkData(CID,DataBuffer,1000)
PrintN(PeekS(databuffer,result))

databuffer hold address of memory,, just needed to feed the address to both of the other functions.. not pointers or address of address lol.
Post Reply