1. I'm trying to load existing user data into some variables. However, when I run this command, even though the program correctly says that the URL exists, it can't "put" data from the URL into a field or variable. I was under the impression that I could read and write files with the URL command.
2. I'm having unexpected problems with my if-then statements. When I apply changes to my card script I get the error "Handler: not a command" on the line "else". I've tried several variations and the only one that doesn't produce an error is if I begin each line in the if-then sequence with "then". However, none of the examples I've seen in the Dictionary or in any online tutorials ever does this. Why is mine behaving differently?
Code: Select all
if there is a URL ("file:" & gName & ".txt") then put line 2 of URL ("file:" & gName & ".txt") into gLanguage
put line 1 of URL ("file:" & gName & ".txt") into fld "userdata"
answer "User data loaded"
else answer "We cannot find your user data. Please set folder and try again."
setfolder
end if
