'NoneType' object has no attribute 'style'
but I'm not sure where the 'NoneType' object is. The 'None' value created by clicking the "Move" button is for the transition of the screen, and is not the problem here. The error only happens when I click the "Place 1" and "Place 2" buttons.
Code: Select all
screen your_turn(unit,name):
modal True
vbox:
imagebutton auto "gui/Battle/phase_button_%s.png" action [SensitiveIf(unit.move_flag), Show("where_you_goin",None,unit,name), Hide("your_turn")]
imagebutton auto "gui/Battle/phase_button_%s.png" action [SensitiveIf(unit.attack_flag), Show("choose_your_battles",None,unit,name), Hide("your_turn")]
imagebutton auto "gui/Battle/phase_button_%s.png" action Return()
vbox:
text "Move"
text "Attack"
text "End"
screen where_you_goin(unit,name):
modal True
vbox:
text "I exist!"
if unit.place == 2:
textbutton "Place 1" action Function(renpy.call, name + "_place1",unit,name)
if unit.place == 1:
textbutton "Place 2" action Function(renpy.call, name + "_place2",unit,name)
label Kazuya_place2(unit,name):
# displayables move and stuff
$ Kazuya.place = 2
$ Kazuya.move_flag = False
call screen your_turn(unit,name)
return
label and_stuff:
$ Kazuya.move_flag = False
$ Kazuya.attack_flag = True
call screen your_turn(Kazuya,"Kazuya")
# and so on