[SOLVED} Value too long

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Bryy
Veteran
Posts: 407
Joined: Thu Dec 20, 2012 10:12 pm
Completed: 30+ games so far
Projects: Furry Shakespeare
Organization: Stegalosaurus Game Development
Location: Portage, MI
Contact:

[SOLVED} Value too long

#1 Post by Bryy »

Got this in my code tonight. All I was doing was fixing the RNG, which I've tested before and it worked.

Code: Select all

I'm sorry, but an uncaught exception occurred.

After loading the script.
OverflowError: value too large to convert to short

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\bootstrap.py", line 290, in bootstrap
    renpy.main.main()
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\main.py", line 413, in main
    if renpy.parser.report_parse_errors():
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\parser.py", line 2542, in report_parse_errors
    renpy.display.error.report_parse_errors(full_text, error_fn)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\error.py", line 179, in report_parse_errors
    error_fn=error_fn,
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\game.py", line 280, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\error.py", line 43, in call_exception_screen
    return renpy.ui.interact(mouse="screen", type="screen", suppress_overlay=True, suppress_underlay=True)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\core.py", line 2492, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\core.py", line 2845, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\core.py", line 1921, in draw_screen
    renpy.config.screen_height,
  File "renpy/display/render.pyx", line 416, in renpy.display.render.render_screen (gen\renpy.display.render.c:6687)
    rv = render(root, width, height, 0, 0)
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 685, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 685, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 685, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\screen.py", line 623, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 685, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 1073, in render
    st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 1489, in render
    cwidth, cheight = sizeit('c', width, height, 0, 0)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 1484, in sizeit
    rend = render(pos_d[pos], width, height, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 1489, in render
    cwidth, cheight = sizeit('c', width, height, 0, 0)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 1484, in sizeit
    rend = render(pos_d[pos], width, height, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\viewport.py", line 249, in render
    surf = renpy.display.render.render(self.child, child_width, child_height, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\display\layout.py", line 887, in render
    surf = render(d, width - x, rh, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
    rv = d.render(widtho, heighto, st, at)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\text\text.py", line 1744, in render
    layout = Layout(self, width, height, renders, splits_from=virtual_layout)
  File "E:\BRYY 11.25.2015\STEG 4.20.2016\renpy-6.99.12.1-sdk\renpy\text\text.py", line 691, in __init__
    textsupport.tweak_glyph_spacing(all_glyphs, lines, target_x - maxx, target_y - y, maxx, y)  # @UndefinedVariable
  File "renpy/text/textsupport.pyx", line 902, in renpy.text.textsupport.tweak_glyph_spacing (gen\renpy.text.textsupport.c:10871)
    g.y += int(dy * g.y / h)
OverflowError: value too large to convert to short
Looking around the web, it tells me a number went too long?

Perhaps it is this guy?
UPDATE: Deleted it, still got the issue.

WARNING! SUPER LONG CODE. I only pasted the first of 14 just like it.

Code: Select all

    
    # A. DAVE
label random_adave:
    if cdave_rng_open:
        if adave_dave_done:
            jump adave_ship_talk2
        else:
            scene crew_perry
            show cdave happy LFT at right
            show adave happy at left with dissolve
            if adave_cdave is 0:
                call 1_adave_cdave
            elif adave_cdave is 1:
                call 2_adave_cdave
            elif adave_cdave is 2:
                call 3_adave_cdave
            elif adave_cdave is 3:
                call 3_adave_cdave
            elif adave_cdave is 4:
                call 4_adave_cdave
            elif adave_cdave is 5:
                call 5_adave_cdave
            elif adave_cdave is 6:
                call 6_adave_cdave
            elif adave_cdave is 7:
                call 7_adave_cdave
            elif adave_cdave is 8:
                call 8_adave_cdave
            elif adave_cdave is 9:
                call 9_adave_cdave
            elif adave_adave_cdave is 10:
                call 10_adave_cdave
            hide adave happy with dissolve
            jump cdave_ship_talk2            
    if bunny_rng_open:
        if adave_bunny_done:
            jump adave_ship_talk2
        else:
            scene crew_perry
            show bunny happy LFT at right
            show adave happy at left with dissolve
            if adave_bunny is 0:
                call 1_adave_bunny
            elif adave_bunny is 1:
                call 2_adave_bunny
            elif adave_bunny is 2:
                call 3_adave_bunny
            elif adave_bunny is 3:
                call 3_adave_bunny
            elif adave_bunny is 4:
                call 4_adave_bunny
            elif adave_bunny is 5:
                call 5_adave_bunny
            elif adave_bunny is 6:
                call 6_adave_bunny
            elif adave_bunny is 7:
                call 7_adave_bunny
            elif adave_bunny is 8:
                call 8_adave_bunny
            elif adave_bunny is 9:
                call 9_adave_bunny
            elif adave_adave_bunny is 10:
                call 10_adave_bunny
            hide adave happy with dissolve
            jump adave_ship_talk2
    elif cady_rng_open:
        if adave_cady_done:
            jump cady_ship_talk2
        else:
            scene crew_perry
            show cady happy LFT at right
            show adave happy at left with dissolve
            if adave_cady is 0:
                call 1_adave_cady
            elif adave_cady is 1:
                call 2_adave_cady
            elif adave_cady is 2:
                call 3_adave_cady
            elif adave_cady is 3:
                call 3_adave_cady
            elif adave_cady is 4:
                call 4_adave_cady
            elif adave_cady is 5:
                call 5_adave_cady
            elif adave_cady is 6:
                call 6_adave_cady
            elif adave_cady is 7:
                call 7_adave_cady
            elif adave_cady is 8:
                call 8_adave_cady
            elif adave_cady is 9:
                call 9_adave_cady
            elif adave_adave_cady is 10:
                call 10_adave_cady
            hide adave happy with dissolve
            jump cady_ship_talk2
    elif ein_rng_open:
        if adave_ein_done:
            jump ein_ship_talk2
        else:
            scene crew_perry
            show ein happy LFT at right
            show adave happy at left with dissolve
            if adave_ein is 0:
                call 1_adave_ein
            elif adave_ein is 1:
                call 2_adave_ein
            elif adave_ein is 2:
                call 3_adave_ein
            elif adave_ein is 3:
                call 3_adave_ein
            elif adave_ein is 4:
                call 4_adave_ein
            elif adave_ein is 5:
                call 5_adave_ein
            elif adave_ein is 6:
                call 6_adave_ein
            elif adave_ein is 7:
                call 7_adave_ein
            elif adave_ein is 8:
                call 8_adave_ein
            elif adave_ein is 9:
                call 9_adave_ein
            elif adave_adave_ein is 10:
                call 10_adave_ein
            hide adave happy with dissolve
            jump ein_ship_talk2
    elif gany_rng_open:
        if adave_gany_done:
            jump gany_ship_talk2
        else:
            scene crew_perry
            show gany happy LFT at right
            show adave happy at left with dissolve
            if adave_gany is 0:
                call 1_adave_gany
            elif adave_gany is 1:
                call 2_adave_gany
            elif adave_gany is 2:
                call 3_adave_gany
            elif adave_gany is 3:
                call 3_adave_gany
            elif adave_gany is 4:
                call 4_adave_gany
            elif adave_gany is 5:
                call 5_adave_gany
            elif adave_gany is 6:
                call 6_adave_gany
            elif adave_gany is 7:
                call 7_adave_gany
            elif adave_gany is 8:
                call 8_adave_gany
            elif adave_gany is 9:
                call 9_adave_gany
            elif adave_adave_gany is 10:
                call 10_adave_gany
            hide adave happy with dissolve
            jump gany_ship_talk2
    elif jack_rng_open:
        if adave_jack_done:
            jump jack_ship_talk2
        else:
            scene crew_perry
            show jack happy LFT at right
            show adave happy at left with dissolve
            if adave_jack is 0:
                call 1_adave_jack
            elif adave_jack is 1:
                call 2_adave_jack
            elif adave_jack is 2:
                call 3_adave_jack
            elif adave_jack is 3:
                call 3_adave_jack
            elif adave_jack is 4:
                call 4_adave_jack
            elif adave_jack is 5:
                call 5_adave_jack
            elif adave_jack is 6:
                call 6_adave_jack
            elif adave_jack is 7:
                call 7_adave_jack
            elif adave_jack is 8:
                call 8_adave_jack
            elif adave_jack is 9:
                call 9_adave_jack
            elif adave_adave_jack is 10:
                call 10_adave_jack
            hide adave happy with dissolve
            jump jack_ship_talk2
    elif janet_rng_open:
        if adave_janet_done:
            jump janet_ship_talk2
        else:
            scene crew_perry
            show janet happy LFT at right
            show adave happy at left with dissolve
            if adave_janet is 0:
                call 1_adave_janet
            elif adave_janet is 1:
                call 2_adave_janet
            elif adave_janet is 2:
                call 3_adave_janet
            elif adave_janet is 3:
                call 3_adave_janet
            elif adave_janet is 4:
                call 4_adave_janet
            elif adave_janet is 5:
                call 5_adave_janet
            elif adave_janet is 6:
                call 6_adave_janet
            elif adave_janet is 7:
                call 7_adave_janet
            elif adave_janet is 8:
                call 8_adave_janet
            elif adave_janet is 9:
                call 9_adave_janet
            elif adave_adave_janet is 10:
                call 10_adave_janet
            hide adave happy with dissolve
            jump janet_ship_talk2
    elif kirk_rng_open:
        if adave_kirk_done:
            jump kirk_ship_talk2
        else:
            scene crew_perry
            show kirk happy LFT at right
            show adave happy at left with dissolve
            if adave_kirk is 0:
                call 1_adave_kirk
            elif adave_kirk is 1:
                call 2_adave_kirk
            elif adave_kirk is 2:
                call 3_adave_kirk
            elif adave_kirk is 3:
                call 3_adave_kirk
            elif adave_kirk is 4:
                call 4_adave_kirk
            elif adave_kirk is 5:
                call 5_adave_kirk
            elif adave_kirk is 6:
                call 6_adave_kirk
            elif adave_kirk is 7:
                call 7_adave_kirk
            elif adave_kirk is 8:
                call 8_adave_kirk
            elif adave_kirk is 9:
                call 9_adave_kirk
            elif adave_adave_kirk is 10:
                call 10_adave_kirk
            hide adave happy with dissolve
            jump kirk_ship_talk2
    elif morris_rng_open:
        if adave_morris_done:
            jump morris_ship_talk2
        else:
            scene crew_perry
            show morris happy LFT at right
            show adave happy at left with dissolve
            if adave_morris is 0:
                call 1_adave_morris
            elif adave_morris is 1:
                call 2_adave_morris
            elif adave_morris is 2:
                call 3_adave_morris
            elif adave_morris is 3:
                call 3_adave_morris
            elif adave_morris is 4:
                call 4_adave_morris
            elif adave_morris is 5:
                call 5_adave_morris
            elif adave_morris is 6:
                call 6_adave_morris
            elif adave_morris is 7:
                call 7_adave_morris
            elif adave_morris is 8:
                call 8_adave_morris
            elif adave_morris is 9:
                call 9_adave_morris
            elif adave_adave_morris is 10:
                call 10_adave_morris
            hide adave happy with dissolve
            jump morris_ship_talk2
    elif ogid_rng_open:
        if adave_ogid_done:
            jump ogid_ship_talk2
        else:
            scene crew_perry
            show ogid happy LFT at right
            show adave happy at left with dissolve
            if adave_ogid is 0:
                call 1_adave_ogid
            elif adave_ogid is 1:
                call 2_adave_ogid
            elif adave_ogid is 2:
                call 3_adave_ogid
            elif adave_ogid is 3:
                call 3_adave_ogid
            elif adave_ogid is 4:
                call 4_adave_ogid
            elif adave_ogid is 5:
                call 5_adave_ogid
            elif adave_ogid is 6:
                call 6_adave_ogid
            elif adave_ogid is 7:
                call 7_adave_ogid
            elif adave_ogid is 8:
                call 8_adave_ogid
            elif adave_ogid is 9:
                call 9_adave_ogid
            elif adave_adave_ogid is 10:
                call 10_adave_ogid
            hide adave happy with dissolve
            jump ogid_ship_talk2
    elif phaze_rng_open:
        if adave_phaze_done:
            jump phaze_ship_talk2
        else:
            scene crew_perry
            show phaze happy LFT at right
            show adave happy at left with dissolve
            if adave_phaze is 0:
                call 1_adave_phaze
            elif adave_phaze is 1:
                call 2_adave_phaze
            elif adave_phaze is 2:
                call 3_adave_phaze
            elif adave_phaze is 3:
                call 3_adave_phaze
            elif adave_phaze is 4:
                call 4_adave_phaze
            elif adave_phaze is 5:
                call 5_adave_phaze
            elif adave_phaze is 6:
                call 6_adave_phaze
            elif adave_phaze is 7:
                call 7_adave_phaze
            elif adave_phaze is 8:
                call 8_adave_phaze
            elif adave_phaze is 9:
                call 9_adave_phaze
            elif adave_adave_phaze is 10:
                call 10_adave_phaze
            hide adave happy with dissolve
            jump phaze_ship_talk2
    elif riley_rng_open:
        if adave_riley_done:
            jump riley_ship_talk2
        else:
            scene crew_perry
            show riley happy LFT at right
            show adave happy at left with dissolve
            if adave_riley is 0:
                call 1_adave_riley
            elif adave_riley is 1:
                call 2_adave_riley
            elif adave_riley is 2:
                call 3_adave_riley
            elif adave_riley is 3:
                call 3_adave_riley
            elif adave_riley is 4:
                call 4_adave_riley
            elif adave_riley is 5:
                call 5_adave_riley
            elif adave_riley is 6:
                call 6_adave_riley
            elif adave_riley is 7:
                call 7_adave_riley
            elif adave_riley is 8:
                call 8_adave_riley
            elif adave_riley is 9:
                call 9_adave_riley
            elif adave_adave_riley is 10:
                call 10_adave_riley
            hide adave happy with dissolve
            jump riley_ship_talk2
    elif tankhammer_rng_open:
        if adave_tank_done:
            jump tankhammer_ship_talk2
        else:
            scene crew_perry
            show tankhammer happy LFT at right
            show adave happy at left with dissolve
            if adave_tank is 0:
                call 1_adave_tank
            elif adave_tank is 1:
                call 2_adave_tank
            elif adave_tank is 2:
                call 3_adave_tank
            elif adave_tank is 3:
                call 3_adave_tank
            elif adave_tank is 4:
                call 4_adave_tank
            elif adave_tank is 5:
                call 5_adave_tank
            elif adave_tank is 6:
                call 6_adave_tank
            elif adave_tank is 7:
                call 7_adave_tank
            elif adave_tank is 8:
                call 8_adave_tank
            elif adave_tank is 9:
                call 9_adave_tank
            elif adave_adave_tank is 10:
                call 10_adave_tank
            hide adave happy with dissolve
            jump tankhammer_ship_talk2
    elif thatcher_rng_open:
        if adave_thatcher_done:
            jump thatcher_ship_talk2
        else:
            scene crew_perry
            show thatcher happy LFT at right
            show adave happy at left with dissolve
            if adave_thatcher is 0:
                call 1_adave_thatcher
            elif adave_thatcher is 1:
                call 2_adave_thatcher
            elif adave_thatcher is 2:
                call 3_adave_thatcher
            elif adave_thatcher is 3:
                call 3_adave_thatcher
            elif adave_thatcher is 4:
                call 4_adave_thatcher
            elif adave_thatcher is 5:
                call 5_adave_thatcher
            elif adave_thatcher is 6:
                call 6_adave_thatcher
            elif adave_thatcher is 7:
                call 7_adave_thatcher
            elif adave_thatcher is 8:
                call 8_adave_thatcher
            elif adave_thatcher is 9:
                call 9_adave_thatcher
            elif adave_adave_thatcher is 10:
                call 10_adave_thatcher
            hide adave happy with dissolve
            jump thatcher_ship_talk2
Last edited by Bryy on Tue Jan 10, 2017 4:23 pm, edited 2 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Value too long

#2 Post by PyTom »

It looks like you may have somehow created a textbox more than 32767 pixels wide, which is the limit.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Bryy
Veteran
Posts: 407
Joined: Thu Dec 20, 2012 10:12 pm
Completed: 30+ games so far
Projects: Furry Shakespeare
Organization: Stegalosaurus Game Development
Location: Portage, MI
Contact:

Re: Value too long

#3 Post by Bryy »

I have no idea how. I didn't alter the textboxes. I just tested the game that other day, it didn't give me this.

EDIT: Short of retracing MY ENTIRE DAY, I have no idea what to do.

EDIT x2: It's something in the actual script file.

Post Reply

Who is online

Users browsing this forum: Google [Bot]