stg-annon / BT-Silver-Base

a base game for BT Silver with some edits
28 stars 18 forks source link

Crash when accessing either of the scrolls in store #1

Closed bondamani closed 8 years ago

bondamani commented 8 years ago

When trying to buy scrolls in store, the game crashes with Index out of range error. Found out that it was because sscroll_ was initialized to an empty list in the_oddities.py . I think Line 28 and 29 in the_oddities.py is the issue. You are initializing to an empty list there. I don't think that's necessary, there is another if condition handling it properly in Line 32.

    if not hasattr(renpy.store,'sscroll_'): #important!
        $ sscroll_ = []
    if not hasattr(renpy.store,'bought_glasses'): #important!
        $ bought_glasses = False
    if not hasattr(renpy.store,'sscroll_'): #important!
        $ sscroll_ = []
        $ sscroll_.append(False)#null
        $ sscroll_.append(False)# Turns TRUE if the scroll had been bought.
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
        $ sscroll_.append(False)
stg-annon commented 8 years ago

fixed and pushed, thanks!

On Thu, Jan 14, 2016 at 10:13 PM, pratith notifications@github.com wrote:

When trying to buy scrolls in store, the game crashes with Index out of range error Found out that it was because sscroll_ was initialized to an empty list in the_odditiespy I think Line 28 and 29 in the_odditiespy is the issue You are initializing to an empty list there I don't think that's necessary, there is another if condition handling it properly in Line 32

if not hasattr(renpystore,'sscroll_'): #important!
    $ sscroll_ = []
if not hasattr(renpystore,'bought_glasses'): #important!
    $ bought_glasses = False
if not hasattr(renpystore,'sscroll_'): #important!
    $ sscroll_ = []
    $ sscroll_append(False)#null
    $ sscroll_append(False)# Turns TRUE if the scroll had been bought
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)
    $ sscroll_append(False)

— Reply to this email directly or view it on GitHub https://github.com/stg-trainer-annon/BT-Silver-Base/issues/1.