summaryrefslogtreecommitdiff
path: root/game/02_init.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/02_init.rpy')
-rw-r--r--game/02_init.rpy5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/02_init.rpy b/game/02_init.rpy
index 9ee3749..7a5076a 100644
--- a/game/02_init.rpy
+++ b/game/02_init.rpy
@@ -26,7 +26,10 @@ init -1 python:
# Returns the dictionary, or returns ERR_INVALID
def dl_search(array, key, search):
try:
- r=(item for item in array if item[key] == search).next()
+ if (PYTHON_VERSION < 3000):
+ r=(item for item in array if item[key] == search).next()
+ else:
+ r=next(item for item in array if item[key] == search)
except:
r=ERR_INVALID
if r is None: