Hello everyone again.
I am currently making a high score/message engine and I need some people to check it out for me. You just run the code, type in anything, and wait 6 seconds for the program to finish. I really need everyone to do this. It would help if you did it about 5 times too. When the engine is finished, I will release the full source to everyone in the forums. Please post in here once you have done it. Thank You.
'***************************
'** Messenger **
'***************************
'get username (no password either in this example)
INPUT "Please enter a username: "; userName$
'---------------
'connect to ftp server using the info of the ftp site you have.
FTP CONNECT "paradise-workshop.netfirms.com", "paradise-workshop", "yvcbz"
FTP SET DIR "www"
'---------------
'get the DATABASE.txt to copy onto the hard drive
'temporarily.
FTP GET FILE "DATABASE.txt", "DATABASE.txt"
'---------------
'open the file that is now on the hard drive.
OPEN TO READ 1, "DATABASE.txt"
'---------------
'put the usernames in the dim array by reading from the file.
READ STRING 1, name1$
IF FILE END(1)=1 THEN GOTO endReadLoop
READ STRING 1, name2$
IF FILE END(1)=1 THEN GOTO endReadLoop
READ STRING 1, name3$
IF FILE END(1)=1 THEN GOTO endReadLoop
READ STRING 1, name4$
IF FILE END(1)=1 THEN GOTO endReadLoop
READ STRING 1, name5$
endReadLoop:
CLOSE FILE 1
DELETE FILE "DATABASE.txt"
amountOfUsers=index
'---------------
'open file to write the usernames plus your own.
OPEN TO WRITE 1, "DATABASE.txt"
if name1$="" then goto endSend
WRITE STRING 1, name1$
if name2$="" then goto endSend
WRITE STRING 1, name2$
if name3$="" then goto endSend
WRITE STRING 1, name3$
if name4$="" then goto endSend
WRITE STRING 1, name4$
if name5$="" then goto endSend
WRITE STRING 1, name5$
endSend:
CLOSE FILE 1
'---------------
'put the updated file on the ftp site
FTP PUT FILE "DATABASE.txt"
'delete the file from your hardrive as it is not needed and will creat errors if kept.
DELETE FILE "DATABASE.txt"
'---------------
'print done and disconnect
FTP DISCONNECT
PRINT "DONE"
PRINT "Press escape"
xxxpetratxxx
B. R. W