Code Errors!
willthiswork89
Posts: 359
this in the pbasic help file for serin
serStr VAR Byte(10) ' Make a 10-byte array Main: serString(9) = 0 ' Put 0 in last byte SERIN 1, 16468, [noparse][[/noparse]STR serStr\9\"!"] ' Input password string DEBUG "Waiting for: ", STR serString, CR SERIN 1, 16468, [noparse][[/noparse]WAITSTR serStr] ' Wait for the password DEBUG "Password accepted!", CR END··serStr VAR Byte(10) ' Make a 10-byte arrayMain: serStr(9) = 0 ' Put 0 in last byte SERIN 1, 16468, [noparse][[/noparse]STR serStr\9] ' Get 9-byte string DEBUG STR serString ' Display the string END·if you notice the bytes variable serStr then look there are a coupld instances where they use serSTRING instead·
serStr VAR Byte(10) ' Make a 10-byte array Main: serString(9) = 0 ' Put 0 in last byte SERIN 1, 16468, [noparse][[/noparse]STR serStr\9\"!"] ' Input password string DEBUG "Waiting for: ", STR serString, CR SERIN 1, 16468, [noparse][[/noparse]WAITSTR serStr] ' Wait for the password DEBUG "Password accepted!", CR END··serStr VAR Byte(10) ' Make a 10-byte arrayMain: serStr(9) = 0 ' Put 0 in last byte SERIN 1, 16468, [noparse][[/noparse]STR serStr\9] ' Get 9-byte string DEBUG STR serString ' Display the string END·if you notice the bytes variable serStr then look there are a coupld instances where they use serSTRING instead·
Comments