The Daily Click ::. Forums ::. Klik Coding Help ::. ingame online scoreboard
 

Post Reply  Post Oekaki 
 

Posted By Message

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
25th March, 2006 at 05:12:54 -

ive seend it done in a few mmf games before and i was wondering if it can be done in tgf and how.

its those ingame online high score tables. how do you get the scores to be in the game. i already have an asp highscore table online that works but it would be cooler if it was to be shown in the game. can anyone help?

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
25th March, 2006 at 10:58:20 -

TGF has the MooSock extension right?
If so then you can retrieve the text from your .asp page and use then simply set a string to the information on that page. Or if you want a more complex one, use delimeters and string parser (again does TGF have this?) - your choice though. But yeh you'll need MooSock as far as I am aware.

 
This is a signature. Have this one on me.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
25th March, 2006 at 21:52:25 -

yeah its got moosock and string parser 2, both of which i have. but from what part of the .asp file do i retrieve them from and how. i haven't really used moosock...ever.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
25th March, 2006 at 21:59:05 -

Just make a .asp page that displays your scores something like:

Flava - 20
Phizzy - 10
Axel - 2
.etc

Then just use MooSock to connect to that page and display the data - there are several articles showing how to do this, the best one probably being Tigerwork's. Search his name, look at his article and I am sure they'll help

 
This is a signature. Have this one on me.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
25th March, 2006 at 22:07:11 -

It must have been a game of being gay.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
26th March, 2006 at 00:16:27 -

i cant get it to work using tigerworks' article.

im using a

"c.1asphost.com/myusername/myaspfile.asp"

to currently display scores online.
the scores are in a table

rank|name|score
_________________
_1__|name1|score1
_2__|name2|score2
_3__|name3|score3

can someone please tell how to connect to that page and display the table on it. cause i honestly hate online coding and dont understand it.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
26th March, 2006 at 08:40:20 -

+ Start of frame
- MooSock: Connect to "c.1asphost.com/myusername/" on port 80

+ Moosock - On Connect
- MooSock: Send text line "POST" + "c.1asphost.com/myusername/myaspfile.asp?name=" + Edittext$( Name ) + "&score=" + Edittext$( Score ) + "HTTP/1.0"
+ Send text line From: myusername@1asphost.com
+ Send text line User-Agent: HTTPTool/1.0
+ Send text line
+ Disconnect

That should submit the data fine - your host address looks weird though so might have to mess around with it. Some people reckon you should use HTTP/1.1 - but from experience using that, it was sometimes buggy. So if it still doesn't work try changing the 1.0 to 1.1. And yes, you need to send an empty text line at the end, then disconnect.

 
This is a signature. Have this one on me.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
26th March, 2006 at 10:02:48 -

and now how do i get the sent data from the .asp file to print into like a text on my game.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
26th March, 2006 at 10:09:01 -

+ Start of frame
- MooSock: Connect to "c.1asphost.com/myusername/" on port 80

+ MooSock - On Connect
- Send text line "GET myaspfile.asp HTTP/1.0"
- Send text line Host: "http://www.myserver.com"
- Send text line

+ MooSock - On Received
Rich edit: Set text to Recv$( MooSock, 1024 )

This will set a rich edit text object to the text received - by the way, the text received will include all the HTML headers and everything, so you will need to use a delimeter to get rid of that. So in your asp page code:


[delimeter]rank|name|score
_________________
_1__|name1|score1
_2__|name2|score2
_3__|name3|score3[delimeter]

Then set string parser source to the text in the rich edit object, and then add delimeter of [delimeter] and get the first element. Should work fine

 
This is a signature. Have this one on me.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
26th March, 2006 at 19:18:52 -

i dont think theres a rich text object in tgf. and it doesnt work with the text or edit objects. or i still just dont understand. so i think ill stay with my online scoreboard. thanks for all your help though.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click