Solved

Apr 2, 2020
38
8
Was just adjusting something in a text file and I got this message when trying to start up the previously working game.

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again


File "game/tablet.rpy", line 211: Line is indented, but the preceding tag statement does not expect a block. Please check this line's indentation.
imagebutton:
^

Ren'Py Version: Ren'Py 7.3.5.606
Sun Dec 06 22:37:16 2020

For context here is the a portion of the file:

screen scr_tablet_music tag menu:
imagebutton: <----- Line 211

idle "back_music" xalign 0.45 yalign 0.53 action NullAction()


if v_tablet_playlist == True:
imagebutton:
idle "btn_phone_back_idle"
hover "btn_phone_back_hover"
xalign 0.48 yalign 0.9
action [Hide("scr_tablet_music"),SetVariable("v_tablet_sub",0),Hide("scr_tablet"),SetVariable('quick_menu', True)]

I know next to nothing about this stuff, does anyone know how to fix this or what this means?
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,548
Three little dots next to flag above this box (when you are typing), click on it and select code, and scroll down to python in the drop down box, and post your code in that, so it's something like this .
Python:
screen scr_tablet_music tag menu:
    imagebutton: <----- Line 211
    idle "back_music" xalign 0.45 yalign 0.53 action NullAction() 
  





if v_tablet_playlist == True:
    imagebutton:
        idle "btn_phone_back_idle"
hover "btn_phone_back_hover"
xalign 0.48 yalign 0.9
action [Hide("scr_tablet_music"),SetVariable("v_tablet_sub",0),Hide("scr_tablet"),SetVariable('quick_menu', True)]
You have mucked up your indentation but unless you post it in the code like above we sort of can't tell you where exactly.
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,728
Code:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.

File "game/tablet.rpy", line 211: Line is indented, but the preceding tag statement does not expect a block. Please check this line's indentation.
    imagebutton:
    ^
I know next to nothing about this stuff, does anyone know how to fix this or what this means?
You're looking in the right bit of code, but it's actually the previous line with the tag menu statement which is the issue.

Try changing this:
Code:
screen scr_tablet_music tag menu:

    imagebutton:
To this:
Code:
screen scr_tablet_music:
    tag menu

    imagebutton:
See if that sorts it out. Remember those indents are 4 spaces, don't use tab character(s) in Ren'Py scripts.

This issue has been discussed several times in the UnRen thread if you do a search in there.
You have mucked up your indentation but unless you post it in the code like above we sort of can't tell you where exactly.
Lmano is trying to alter some values in the tablet.rpy script from Sunshine Love and used UnRen to get at the files.

I'm vague about why, but the version of UnRPYC in UnRen 8 has a decompile bug which merges the tag statement into the preceding line & messes up the indentation requirements.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,383
15,291
You're looking in the right bit of code, but it's actually the previous line with the tag menu statement which is the issue.

Yeah, it's a well known error from an old un.rpyc, due to a change not backward compatible in Ren'py.

The solution you gave solve the problem, but using the last version of un.rpyc, or at least the last version of unren would be a good idea, in order to not face this error the next time.
 
  • Like
Reactions: Meushi
Apr 2, 2020
38
8
You're looking in the right bit of code, but it's actually the previous line with the tag menu statement which is the issue.

Try changing this:
Code:
screen scr_tablet_music tag menu:

    imagebutton:
To this:
Code:
screen scr_tablet_music:
    tag menu

    imagebutton:
See if that sorts it out. Remember those indents are 4 spaces, don't use tab character(s) in Ren'Py scripts.

This issue has been discussed several times in the UnRen thread if you do a search in there.

Lmano is trying to alter some values in the tablet.rpy script from Sunshine Love and used UnRen to get at the files.

I'm vague about why, but the version of UnRPYC in UnRen 8 has a decompile bug which merges the tag statement into the preceding line & messes up the indentation requirements.
Beauty that did it thank you.
 
  • Like
Reactions: Meushi
Apr 2, 2020
38
8
Yeah, it's a well known error from an old un.rpyc, due to a change not backward compatible in Ren'py.

The solution you gave solve the problem, but using the last version of un.rpyc, or at least the last version of unren would be a good idea, in order to not face this error the next time.
Do you have a link to a newer version I can use or is it just the 0.9 dev version you are talking about?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,383
15,291
Do you have a link to a newer version I can use or is it just the 0.9 dev version you are talking about?
Normally the version 0.9-dev of unren should be enough. But else you can go to directly get the last release of un.rpyc.