• Not writting the varable to the file

    From Phil@VERT/PLT2 to All on Thu Nov 19 09:28:50 2009
    This is not writting the information to the file.ãã!INCLUDE ERRNO.INCã!INCLUDE FILE_IO.INCã!INCLUDE DIR_ATTR.INCã!INCLUDE USERDEFS.INCã!INCLUDE NODEDEFS.INCã!INCLUDE SBBSDEFS.INCãã########################## Exampleã#COMPARE_ARS FLAG "4G"ã#IF_TRUEã#print "The flag is set ok\r\n"ã#end_ifã#PAUSEã########################## END OF EXAMPLEããã#### START OF THE PROGRAMããINT F1 F2 F3 F4 # File handlerãINT SL # Users Security LevelãSTR USERNAME # Users Nameãstr info1 # dummy varable read a line from the fileã# printf "Username Online is: \%s" USERNAMEãcopy username _useron.nameãcopy sl _useron.level # Get the users security levelãgoto testãcompare_ars level 20 # Check and see if the user has security level 50ãif_falseãgoto endãend_ifãfopen f1 o_rdonly "%!upgraded.txt"ãfeof f1ãif_trueãfclose f1ãgoto adduserãend_ifãfread_line f1 info1 # Read from the fileãcompare f1 username # Compare the username with whats in theãfile.ãIf_true # Found a match/ Do not add the user nameãto the fileãgoto no1ãelse # Add the user to upgraded.txtãfclose f1 # Close file/ Re-Open it as writeã:testãfopen f1 O_RDWR|O_CREAT "%!upgraded.txt" # Open the file as append.ãprintf "\%s" UserNameãprintf "\r\n"ãfset_pos f1 0 seek_endãtruncsp usernameãfwrite f1 username 40ãfprintf f1 "%s" usernameãfflush f1ãfclose f1ãgoto endãend_ifããã:adduserãã:no1 # User is already in the upgraded.txtãfile/ do not add himãfclose f1ãgoto endãã:endãpauseãããããããããã---ã þ Synchronet þ bbs.cyberchatnet.com - 192.168.1.102ã