Author Topic: String to List Glitch  (Read 10242 times)

0 Members and 1 Guest are viewing this topic.

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
Re: String to List Glitch
« Reply #15 on: May 24, 2010, 05:47:27 pm »
Oooh ok x.x. Is there a possible check to make sure the person won't input a list?

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: String to List Glitch
« Reply #16 on: May 24, 2010, 05:54:52 pm »
not really. after inputting A, trying to see if LA exists may produce errors. I may be wrong, but I don't think it's possible in pure BASIC. All you can really do is preset A to some absurd value so it would just ask for input again anyway if someone input a list
For example:
Code: [Select]
Repeat A>=0 and not(fPart(A
-1->A
Input "Value: ",A
End
//Rest of code here
I'm assuming this program only accepts non-negative integers
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

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
Re: String to List Glitch
« Reply #17 on: May 24, 2010, 05:56:00 pm »
mhmm I see :/

I guess then you need to put a warning in the readme (altough few people actually read those) so the user won't output a list so he wont risk running out of RAM or overwriting one of his list
« Last Edit: May 24, 2010, 05:56:25 pm by DJ Omnimaga »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: String to List Glitch
« Reply #18 on: May 24, 2010, 09:45:52 pm »
What i would do is make sure the variable is a valid input before the user inputs anything, so if they try a list, it wont change the variable and they will be just directed to the default screen for inputting weird data :P

Offline rthprog

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +5/-0
    • View Profile
Re: String to List Glitch
« Reply #19 on: May 25, 2010, 08:14:55 am »
(less useful tip)
You can also do it from the editor. Just select the header, and type your function in with quotation marks.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: String to List Glitch
« Reply #20 on: May 28, 2010, 01:25:45 pm »
That's really cool! I might have to use this feature...

I've found that it's really useful if you want to make a passcode feature, as for a puzzle game with a passcode for each level. Just do something like

:"randInt(1,26,10)E4+randInt(1,26,10)E2+randInt(1,26,10→PCODE

and you'll have a nearly unhackable 3-letter passcode for each level stored in list PCODE. Before accessing the password, you can even specify something like a key to decrypt it by having a

:[num]→rand

where [num] is some arbitrary integer. That way, the only way for the user to find the password is if he happens to know the key (i.e., the value of [num]).
« Last Edit: July 10, 2012, 03:55:27 pm by Deep Thought »




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
Re: String to List Glitch
« Reply #21 on: May 28, 2010, 01:59:12 pm »
I wonder if something similar could be used for save files? I know the guy who made the first xLIB Metroid in 2006 had a password-based save system, but I never checked if it was easily hackable or not. I myself never figured out how to do such save system.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: String to List Glitch
« Reply #22 on: May 28, 2010, 03:14:03 pm »
I wonder if something similar could be used for save files? I know the guy who made the first xLIB Metroid in 2006 had a password-based save system, but I never checked if it was easily hackable or not. I myself never figured out how to do such save system.

If a list function were used, it'd be too easily hackable (since all the user has to do is go into the list editor and change the function to change his stats).