home *** CD-ROM | disk | FTP | other *** search
- on loaddata
- global getpoints, getpieces, getitems, explode, etcpict, moteloldman, sheriffcheck, masterrunning, nearmiss, seedog, oldsuzan
- openXLib("fileio.dll")
- set fileobj to fileio(mnew, "?read", "TXT")
- if objectp(fileobj) then
- updateStage()
- set data to fileobj(mreadfile)
- if the number of lines in data = 6 then
- repeat with i = 1 to 8
- setAt(getpoints, i, value(item i of line 1 of data))
- end repeat
- repeat with i = 1 to 10
- setAt(getpieces, i, value(item i of line 2 of data))
- end repeat
- repeat with i = 1 to 7
- setAt(getitems, i, value(item i of line 3 of data))
- end repeat
- repeat with i = 1 to 4
- setAt(explode, i, value(item i of line 4 of data))
- end repeat
- repeat with i = 1 to 13
- setAt(etcpict, i, value(item i of line 5 of data))
- end repeat
- set moteloldman to value(item 1 of line 6 of data)
- set sheriffcheck to value(item 2 of line 6 of data)
- set masterrunning to value(item 3 of line 6 of data)
- set nearmiss to value(item 4 of line 6 of data)
- set seedog to value(item 5 of line 6 of data)
- set oldsuzan to value(item 6 of line 6 of data)
- return 1
- else
- updateStage()
- alert("Can't loaded -->This error is" && QUOTE & "File type error" & QUOTE)
- return 0
- end if
- fileobj(mdispose)
- else
- updateStage()
- if fileio(merror, fileobj) <> "File Not Found" then
- alert("Can't loaded -->This error is" && QUOTE & fileio(merror, fileobj) & QUOTE)
- end if
- end if
- closeXLib("fileio.dll")
- end
-