Highscore Table

Get help using Construct 2

Post » Mon Dec 19, 2011 7:07 pm

how do you give the scripts read and write access?
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Mon Dec 19, 2011 10:56 pm

Most ftpclients have a chmod function to Set read/write stuff
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Tue Dec 20, 2011 12:10 pm

Ok maybe im being dumb, I uploaded the files to dropbox, It works kinda, I press the left key, It submits a score, I press right then something shows, But its not score..

Take a look http://dl.dropbox.com/u/51270524/scorestest/index.htmlTom2012-01-13 13:59:20
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 20, 2011 2:45 pm

Looks like PHP is disabled on dropbox(makes sense). Thus it won't work :)

You need a webserver which supports php.
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Tue Dec 20, 2011 7:04 pm

Oooooh, Thanks, I uploaded it to my webserver and it worked!
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 20, 2011 10:56 pm

I just updated my Playtomic plugin with leaderboards support. To use it, all you need (apart from the plugin obviously!) is a Playtomic account (create one for free at playtomic.com). I tried to make it super easy to use and included a demo so you should be able to use without any advanced server/programming knowledge.

Check it out if you're interested: http://www.scirra.com/forum/plugin-playtomic-metrics-analytics_topic47142.htmlwgfunstorm2011-12-20 22:57:00
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Fri Dec 23, 2011 5:28 pm

@Ize, Do you know how to determine what position on the scoreboard the player is and what player is number 1 in the scoreboard?
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sat Dec 24, 2011 4:12 pm

Hello,
I think I understood how it works, though I would have a question, how do you send the value of your variable (for e.g score, it is a construct 2 variable) to your php file with the ajax command ? In your example, you just request "post.php?name=NEWENTRY?score=1337", how can you send instead values of construct variables ?
Would something like "post.php?name=&name?score=&score" work ? Cause it seems to me that you can just send arbitrary values to your php file and not really variable values.

Please excuse my poor English.
B
1
G
1
Posts: 1
Reputation: 427

Post » Sat Dec 24, 2011 7:32 pm

I think what you're after is:

"post.php?name=" & name & "&score=" & score

(assuming name and score are 2 variables in your project)

Text goes in quotations. Variable references go outside of quotations.

Also I'm pretty sure, ? goes after .php and before name=, but after that first ? you use & instead of ? for any other post'ed properties.wgfunstorm2011-12-24 19:33:18
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Sun Dec 25, 2011 10:50 am

Wgfunstorm is right.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 15 guests