[EDIT] Non-compilable. This code is after user inputs user$ and pass$. [/edit]
On the server side I have:
plrID = net player joined()
name$ = net get string()
if file exist(name$+".txt")
open to read 1, (name$+".txt")
read string 1, dump$
read string 1, password$
if password$ = net get string()
plr(plrID).exist = 1
read float 1, plr(plrID).oldx
read float 1, plr(plrID).oldy
read float 1, plr(plrID).oldz
read float 1, plr(plrID).zonenum
net put byte LOGIN_INFO
net put float plr(plrID).zonenum
net put float plr(plrID).oldx
net put float plr(plrID).oldy
net put float plr(plrID).oldz
net send plrID
else
net put byte 2
net send plrID
endif
close file 1
endif Where on the client side I have
print "Sending Login info..."
Net put byte LOGIN_INFO
Net put string name$
Net put string pass$
Net send 0
loggedin = 0
while loggedin = 0
while net get message()
loggedin = Net get byte()
plr(plryou).zonenum = net get float()
plr(plryou).oldx = net get float()
plr(plryou).oldy = net get float()
plr(plryou).oldz = net get float()
endwhile
if loggedin = 2
print "Wrong password."
wait key
end
endif
endwhile
This is the point where the client sends the login name and password. The client gets the username, checks if the password is right and moves on. After this I have a bunch of put followed by the Net send. THIS WORKS, but only for the byte that is sent. The client takes the byte (which is needed to get out of the while) and moves on WITHOUT THE OTHER SENDS. When this is compiles I get, on the server side, 0 for zonenum and really small (7.22 e-62) values for the float.
Is this is read file error or a net send error?
Btw heres what the account files look like:
Name of the file = username
-username
-password
-x
-y
-z
-zone number ( not really used yet.)
blake
PASSWORD
3337.34
570.11
-651.68
1
Ventures of the worlds around us are only limited by imagination.