diff options
Diffstat (limited to 'Classes/GameOverScene.m')
-rwxr-xr-x | Classes/GameOverScene.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Classes/GameOverScene.m b/Classes/GameOverScene.m index bc081ff..94236ff 100755 --- a/Classes/GameOverScene.m +++ b/Classes/GameOverScene.m | |||
@@ -88,15 +88,15 @@ | |||
88 | textField.enabled = NO; | 88 | textField.enabled = NO; |
89 | submitSwitch.enabled = NO; | 89 | submitSwitch.enabled = NO; |
90 | 90 | ||
91 | const char* sqlQuery = [[NSString stringWithFormat:@"INSERT INTO highscores (name, score) VALUES (\"%@\",%d)", [textField text], score] UTF8String]; | 91 | const char* sqlQuery = [[NSString stringWithFormat:@"INSERT INTO highscores (name, score, gameMode) VALUES (\"%@\",%d,\"Collect\")", [textField text], score] UTF8String]; |
92 | sqlite3_stmt* compiled_statement; | 92 | sqlite3_stmt* compiled_statement; |
93 | 93 | ||
94 | if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) | 94 | if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) |
95 | { | 95 | { |
96 | sqlite3_step(compiled_statement); | 96 | sqlite3_step(compiled_statement); |
97 | NSLog(@"awesome, %@", [textField text]); | 97 | NSLog(@"awesome, %@, %d", [textField text], score); |
98 | } else { | 98 | } else { |
99 | NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg([Cart_CollectAppDelegate database])); | 99 | NSLog(@"Error while adding highscore to local highscore list. '%s'", sqlite3_errmsg([Cart_CollectAppDelegate database])); |
100 | } | 100 | } |
101 | 101 | ||
102 | if (submitSwitch.on) | 102 | if (submitSwitch.on) |