home *** CD-ROM | disk | FTP | other *** search
/ Seeker / Seeker.iso / files_w / opening.dir / 00110.ls < prev    next >
Encoding:
Text File  |  1994-12-06  |  1.6 KB  |  45 lines

  1. on loaddata
  2.   global getpoints, getpieces, getitems, explode, etcpict, moteloldman, sheriffcheck, masterrunning, nearmiss, seedog, oldsuzan
  3.   openXLib("fileio.dll")
  4.   set fileobj to fileio(mnew, "?read", "TXT")
  5.   if objectp(fileobj) then
  6.     updateStage()
  7.     set data to fileobj(mreadfile)
  8.     if the number of lines in data = 6 then
  9.       repeat with i = 1 to 8
  10.         setAt(getpoints, i, value(item i of line 1 of data))
  11.       end repeat
  12.       repeat with i = 1 to 10
  13.         setAt(getpieces, i, value(item i of line 2 of data))
  14.       end repeat
  15.       repeat with i = 1 to 7
  16.         setAt(getitems, i, value(item i of line 3 of data))
  17.       end repeat
  18.       repeat with i = 1 to 4
  19.         setAt(explode, i, value(item i of line 4 of data))
  20.       end repeat
  21.       repeat with i = 1 to 13
  22.         setAt(etcpict, i, value(item i of line 5 of data))
  23.       end repeat
  24.       set moteloldman to value(item 1 of line 6 of data)
  25.       set sheriffcheck to value(item 2 of line 6 of data)
  26.       set masterrunning to value(item 3 of line 6 of data)
  27.       set nearmiss to value(item 4 of line 6 of data)
  28.       set seedog to value(item 5 of line 6 of data)
  29.       set oldsuzan to value(item 6 of line 6 of data)
  30.       return 1
  31.     else
  32.       updateStage()
  33.       alert("Can't loaded -->This error is" && QUOTE & "File type error" & QUOTE)
  34.       return 0
  35.     end if
  36.     fileobj(mdispose)
  37.   else
  38.     updateStage()
  39.     if fileio(merror, fileobj) <> "File Not Found" then
  40.       alert("Can't loaded -->This error is" && QUOTE & fileio(merror, fileobj) & QUOTE)
  41.     end if
  42.   end if
  43.   closeXLib("fileio.dll")
  44. end
  45.