User Tag List

Results 1 to 3 of 3

Thread: Online Scores using PHP/mySQL - Choosing what number to submit?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Online Scores using PHP/mySQL - Choosing what number to submit?

    Hi

    I'm using Jeff Vance's guide to implement online scores in my game, and everything is running like it should except that I can't figure out how to choose what scores are uploaded. The way the example is constructed it has a text box in which the player enter the score they wish to submit. This is obviously not useful, how do I change it so that for example, the players score is uploaded, instead of whatever's in that box? I've tried changing the code, but whenever I do I just get an error message saying I can't mix strings and numbers. Same when I try to set the text in the box to a counter value.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your problem is that you just need to change the number to a string - even though they look the same to us, numbers and strings are treated differently by the computer and it needs to know exactly which one you're talking about. (Think about adding the strings "2" + "2" together versus the numbers 2 + 2, for example).

    To convert a value to a string, just use Str$(value here) - so you could submit a score in place of Edittext$("Edit Box") by using Str$(score("Player 1")).
    If you ever need to convert a string to a value, use Val(the string).

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, thanks alot.

Similar Threads

  1. Online high scores
    By MJK in forum iOS Export Module Version 2.0
    Replies: 12
    Last Post: 23rd August 2011, 05:46 PM
  2. high scores and mysql
    By videogiochi in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 13th July 2011, 01:58 PM
  3. Having trouble with the online high scores tut
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th May 2011, 09:26 PM
  4. Freehost10.com with online hi scores?
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th April 2009, 03:07 AM
  5. [Request] Online mySQL Extension
    By wizkidweb in forum Extension Development
    Replies: 10
    Last Post: 28th March 2008, 12:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •