Trying to set a number of times you can do an action....
Posted: Sat Jan 14, 2012 1:44 am
Basically, I need to set a variable for time. A number. That I can decrease by one, and then test to see if it equals zero to see if a day ends, based on what choices a person makes during the day.
I've tried simply making it somthing like....
Followed by....
When applicable... but unlike in the inventory and money page of the wiki (http://www.renpy.org/wiki/renpy/doc/coo ... ney_System), it had issues with the second line of code there, and refused to add the one to the value. Can anyone explain to me a way to do this? If possible, one that could be easily repeatable?
This is the full error code I got, for the record:
I've tried simply making it somthing like....
Code: Select all
$ test = "0"
Code: Select all
$ test += 1
This is the full error code I got, for the record:
Something where I could add a minimum and maximum the number can go to as well would be just peachy. >.< I've been messing with this for about an hour now.... Thanks to anyone who helps!I'm sorry, but an uncaught exception occurred.
TypeError: cannot concatenate 'str' and 'int' objects
While running game code:
- script at line 25 of C:\Users\ProxyPawaa\Desktop\Folders\Game Development\Apples and Oranges; Dawn/game/script.rpy
- python at line 25 of C:\Users\ProxyPawaa\Desktop\Folders\Game Development\Apples and Oranges; Dawn/game/script.rpy.
-- Full Traceback ------------------------------------------------------------
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\bootstrap.py", line 270, in bootstrap
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\main.py", line 310, in main
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\main.py", line 93, in run
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\execution.py", line 259, in run
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\ast.py", line 574, in execute
File "C:\Users\ProxyPawaa\Desktop\Folders\renpy-6.11.2\renpy\python.py", line 957, in py_exec_bytecode
File "C:\Users\ProxyPawaa\Desktop\Folders\Game Development\Apples and Oranges; Dawn/game/script.rpy", line 25, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
While running game code:
- script at line 25 of C:\Users\ProxyPawaa\Desktop\Folders\Game Development\Apples and Oranges; Dawn/game/script.rpy
- python at line 25 of C:\Users\ProxyPawaa\Desktop\Folders\Game Development\Apples and Oranges; Dawn/game/script.rpy.
Ren'Py Version: Ren'Py 6.11.2b