Author Topic: list detection?  (Read 2510 times)

0 Members and 1 Guest are viewing this topic.

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
list detection?
« on: November 16, 2007, 08:54:00 am »
i was wondering how basic games handle high scores. i realize that people store the list to the archive after the game closes, i was wondering how you would detect that. here are my thoughts:

3 states of a particular list
1: archive
2: nonexistant
3: not in the archive

deciphering between groups 1 and 3 is easy, unarchive will unarchive if in archive and leave if in ram. Likewise 2 and 3 is easy, if you set dim as 2 then it wont overwirte the data and you can check if the first element is nonzero. The problem occurs when you need to differentiate between archive and non existant. if you give the command to unarchive, then if it doesnt exist you get an error, the only way i can see around this is if there is a way to detect if a list exists whether its in teh archive or not...is this possible, are my thoughts completely off, is there another way to do this? any help would be appreciated

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
list detection?
« Reply #1 on: November 16, 2007, 09:18:00 am »
SetUpEditor LHIGH
If number of scores != dim(LHIGH
LHIGH does not exist in the form you want it to

Offline simplethinker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 695
  • Rating: +16/-5
  • snjwffl
    • View Profile
list detection?
« Reply #2 on: November 16, 2007, 10:39:00 am »
Some information on high scores can be found http://tibasicdev.wikidot.com/highscores.
Also, a couple other nice things about the SetUpEditor command is that it will unarchive a list automatically and that it doesn't modify data in the list.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky



Chip's Challenge: ħ%

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
list detection?
« Reply #3 on: November 16, 2007, 01:41:00 pm »
thanks, i didnt know that it did that, that makes things way easier

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
list detection?
« Reply #4 on: November 16, 2007, 02:31:00 pm »
wow I didnt knew it unarchived them

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
list detection?
« Reply #5 on: November 17, 2007, 05:31:00 am »
It will unarchive it if it is archived , it will create it if it doesn't exist, and it will leave it alone if it is unarchived.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner