Re: Online Highscores Help
Quote:
Originally Posted by dylan99379
With the code problem, my database is also called highscores, so should i rename the code to b13_1564643_highscores or using the host name sql112.byethost13.com_highscores
I use the paid version of bytehost hosting (I own www.clickalize.com), and when I make MySQL databases, they start with clickali_******. I'm pretty sure it will be yourusername_highscores, or as you said b13_1564643_highscores.
Re: Online Highscores Help
Ummm... can't you just right click on the file and click rename? Or click, wait a second or two, and click again to rename? I always do that... works like a charm.
Re: Online Highscores Help
Quote:
Originally Posted by _LB
Ummm... can't you just right click on the file and click rename? Or click, wait a second or two, and click again to rename? I always do that... works like a charm.
No, there must be a technical problem with my computer because that wasn't working.
Alrighty, i got a few hours to continue tinkering with this. I'm pretty sure it will work well now, but i'll post if i got anymore problems.
Thanks for all the help brandon = )
Re: Online Highscores Help
Ok, new problem(s).
I'm still not sure baout my coding in the files uploaded to bytenet.. but i would like to get the coding in the game done first to see what happens when i submit a score.
All is going well on the tutorial untill i came upto this part
+ MooSock object: On Connect
-> Status string: Set alterable string to "Submitting score"
-> MooSock object: Send text line "GET http://[youraddresshere]/submitscore.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))
-> MooSock object: Send text line "From: clicktutorial@nowhere.com"
-> MooSock object: Send text line "User-Agent: HTTP-Tool/1.0"
-> MooSock object: Send text line "" (i.e. an empty string)
-> MooSock object: Listen on port 80
I got upto line two(where have to send text line) and i did this
"GET ftp://ftp.byethost13.com/htdocs/displayscores2(.PHP)name="Global String A"+"&score="+Str$( "value( "Combat Experience" ))"
I know it must be annoying but can someone experienced with moosock please tell me whats going wrong.
It could also be that the web address i'm adding in is wrong.
So basicly i need a very kind person to check the coding im using to send to the server(and if anyone is experienced with byte_host or other hosting sites please tell me the best way the find my URL)
thanks
Dylan (confused and scared atm)
Re: Online Highscores Help
I think you have some extra quotes and missing some +'s in there...it should be like this:
"GET ftp://ftp.byethost13.com/htdocs/displayscores2(.PHP)name="+Global String A+"&score"+Str$(value( "Combat Experience" )
Also, I think you need an http address not an ftp one
Re: Online Highscores Help
Quote:
Originally Posted by KetchupMaster
I think you have some extra quotes and missing some +'s in there...it should be like this:
"GET ftp://ftp.byethost13.com/htdocs/displayscores2(.PHP)name="+Global String A+"&score"+Str$(value( "Combat Experience" )
Also, I think you need an http address not an ftp one
I copied and pasted your code in and it looked correct(everything was either purple or blue) but still said syntac error.
Your probaly right about needing a http adress, as it asks for a password when trying to open the webpage, but i can't seem to find it anyone on bytehost.
Re: Online Highscores Help
"GET http://www.clickalize.com/submitscore.php?name="+string$( "String" )+"&score="+Str$(Points)+"&mdfive="+mdFive$( "String Parser" ) Here is a line I ripped straight out of one of my online games. And yes Ketchup Master is right about the http thing. Ftp is for uploading the files to the server.
Re: Online Highscores Help
Quote:
Originally Posted by dylan99379
+ MooSock object: On Connect
-> Status string: Set alterable string to "Submitting score"
-> MooSock object: Send text line "GET http://[youraddresshere]/submitscore.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))
-> MooSock object: Send text line "From: clicktutorial@nowhere.com"
-> MooSock object: Send text line "User-Agent: HTTP-Tool/1.0"
-> MooSock object: Send text line "" (i.e. an empty string)
-> MooSock object: Listen on port 80
I got upto line two(where have to send text line) and i did this
"GET ftp://ftp.byethost13.com/htdocs/displayscores2(.PHP)name="Global String A"+"&score="+Str$( "value( "Combat Experience" ))"
It should be this:
On submit score:
Connect to www.byethost13.com (or whatever the first bit of your web address is, between http:// and the next /) on port 80
MooSock object: On Connect
-> Status string: Set alterable string to "Submitting score"
-> MooSock object: Send text line "GET /submitscore.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))+" HTTP/1.1" (this is "GET ", then the second half of the address (after the .com), then "?" then the data you want to send, then " HTTP/1.1". Also make sure there is no spaces in the data you're sending (change them to "%20" or remove them).)
-> MooSock object: Send text line "Server: www.byethost13.com" (same as you connected to)
-> MooSock object: Send text line "User-Agent: HTTP-Tool/1.0" (you should change this to the name and version of your game)
-> MooSock object: Send text line "" (i.e. an empty string)
No need to listen on port 80, you'll receive a reply anyway. Add the reply to an edit box or string or something to have a look.
Re: Online Highscores Help
Yes, I'd been meaning to remove the "Listen" line for a while - it was a mistake that I picked up when I learned from a different tutorial, and mistakenly propagated it to everyone else.
However (and this is a big 'however'), I'd actually now recommend ditching MooSock entirely and using Jam's Live Receiver object instead. I know that the method I used in the tutorial has problems with certain servers, and Jam's extension is quite successful at getting around them.
It's also quicker - all you need is the address and the GET string to send - the "GET /submitscore.php?name="+Edittext$( "Edit Box" )+"&score="+Str$(value( "Counter" ))" bit.
Re: Online Highscores Help
Ok everyone thanks again for the help.
I have changed the code to this:
"GET/http://dylan99379.bytehost13.com/submitscore.php?name="Global String A+"&score="value( "Combat Experience" ))+" HTTP/1.1"
Also tried this one
"GET http://dylan99379.byethost13.com/htdocs/displayscores2(.PHP)name="+Global String A+"&score"+Str$(value( "Combat Experience"
(combat experience is the counter i want to use for the score and global string A contains the players name which is submited at the start of the game.)
But it is still saying syntax error (how do you get the GET at the start? i can't find it anywhere on the moosock object.)
(Also please note that i have not used moosock before, tried to but could'nt work it out.)
Also i found the right right adress(instead of ftp one) but when i go there it's some wierd google site lol. (http://dylan99379.byethost13.com)
(if it's against forum rules to post links to sites please tell me and i'll edit.)
So yer, Getting there = )
Found right address, code's getting better.
Timezones make it so that i can't work on this while your all online(im at school at that time). On saturday i should be on allot mroe frequently.
So yer i can code for the next 6 and a half hours.
Found right address, code's getting better.
Thanks for the help so far, your all my god's (i have shrines to each person who has replied and i worship them daily.)
Dylan