Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 939219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:45:19+00:00 2026-05-15T21:45:19+00:00

I want to make a simple highscore system for my game. No posting online,

  • 0

I want to make a simple highscore system for my game. No posting online, just storing your best scores on the device, maybe being able to share them on Twitter or something like that.

My table is like this:

CREATE TABLE highscores ( name VARCHAR(10), score INT )

and then I want to find an easy way to retrieve the name, score and order it by score descending, returning the top 5.

SELECT name, score FROM highscores ORDER BY score DESC LIMIT 0, 5

I tried to do this, following this SQLite tutorial:
http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/

I created the database, set it up, tried to make my own wrapper, but I got the following problems:

  • It worked loading the score, but loading the name, which I tried to convert to a NSString* like they do in the tutorial, wouldn’t work, it just returned 0 even though I had set the name to “Johannes”
  • If I navigated away from the scores page, and then back to the menu, and clicked on the scores page again the app crashed.

Any ideas? I’m really stressed I can’t find ANYTHING online about this. :[

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:45:19+00:00Added an answer on May 15, 2026 at 9:45 pm

    Dude… Overkill.

    Just save this data in an object or array, to save and restore the object betweens sessions use NSUserDeafults.

    To order the data. Use Predicates. Failing that just sort it your self.
    http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Predicates/Articles/pUsing.html

    Seriously don’t waste anytime getting your app live. I like to say “fail quickly”, which means figure out what doesn’t work and run with what works and make that awesome. Nothing worse than spending days/weeks on an app that might only make a few bucks.

    Hope this is a help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a simple game: 2d, single-player, without tons of animations and
I want to make a simple game so that I can play against my
So here's the situation. I want to make a simple game for android. It's
another quick question, I want to make simple console based game, nothing too fancy,
I want to make a simple just-in-time compiler with c on Linux. How can
I just want to make a simple native query with EclipseLink, but I can't
Let's say I want to make a simple project tracking system. A manager can
I want make a simple referral system. Basically referral URL structure something like this.
Just want to make simple extension for syntactic sygar : public static bool IsNotEmpty(this
I want to make a simple news system using PHP and MySQL, right now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.