- Mar 15, 2021
- 577
- 713
I have this problem in my game:
Everything works fine until u try to load the save
File "game/script/script.rpy", line 1212, in execute
screen begin_gameplay:
File "game/script/script.rpy", line 9400, in execute
showif Status_on == True:
File "game/script/script.rpy", line 9620, in execute
showif persistent.Skill_points > 0:
File "game/script/script.rpy", line 9621, in execute
if persistent.cold_weapons < 100:
File "game/script/script.rpy", line 9622, in execute
textbutton "{size=28}{color=#FFFFFF}+{/size}{/color}":
File "game/script/script.rpy", line 9622, in keywords
textbutton "{size=28}{color=#FFFFFF}+{/size}{/color}":
File "<screen language>", line 9623, in <module>
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
IDK why this happens. But I know what means that's basically said to me that's my persistent is == None and none is not a number so they can do " none-1"
But the persistent are supposed to save when the game close at least is that's whats are on manual
** All data reachable through fields on persistent is saved when Ren'Py terminates, or when renpy.save_persistent() is called. Persistent data is loaded when Ren'Py starts, and when Ren'Py detects that the persistent data has been updated on disk. **
Does anyone know how I can fix this? and why this happens?
Code:
label start:
$persistent.coldweapons = 0
$persistent.SkillPoints = 0
screen game_play:
showif status == True: ## Show the status menu
showif persistent.skillpoints > 0: ## This controls if u have points to use.
showif persistent.coldweapons <= 100: ## This is needed cause the maximum of skill is 100
textbutton "+":
action [SetVariable("persistent.skillpoints",persistent.skillpoints-1),
SetVariable("persistent.coldweapons",persistent.coldweapons+1)]
xpos any number
ypos any number
File "game/script/script.rpy", line 1212, in execute
screen begin_gameplay:
File "game/script/script.rpy", line 9400, in execute
showif Status_on == True:
File "game/script/script.rpy", line 9620, in execute
showif persistent.Skill_points > 0:
File "game/script/script.rpy", line 9621, in execute
if persistent.cold_weapons < 100:
File "game/script/script.rpy", line 9622, in execute
textbutton "{size=28}{color=#FFFFFF}+{/size}{/color}":
File "game/script/script.rpy", line 9622, in keywords
textbutton "{size=28}{color=#FFFFFF}+{/size}{/color}":
File "<screen language>", line 9623, in <module>
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
IDK why this happens. But I know what means that's basically said to me that's my persistent is == None and none is not a number so they can do " none-1"
But the persistent are supposed to save when the game close at least is that's whats are on manual
** All data reachable through fields on persistent is saved when Ren'Py terminates, or when renpy.save_persistent() is called. Persistent data is loaded when Ren'Py starts, and when Ren'Py detects that the persistent data has been updated on disk. **
Does anyone know how I can fix this? and why this happens?