Jump to content


Photo
- - - - -

Online Games List


  • Please log in to reply
48 replies to this topic

#31 Catan

Catan

    GMC Member

  • GMC Member
  • 278 posts

Posted 07 June 2010 - 11:34 AM

Right, but what exactly do I put in these fields?

string_parse(str,token,ignore_null)

I tried this, and it's not working

string_parse(ds_list_find_value(games_list,selected_game), "|", true);

Seems ok to me, but I never used this script. Keep in mind that the script returns a ds_list
  • 0

#32 Noritox

Noritox

    GMC Member

  • GMC Member
  • 279 posts
  • Version:GM:Studio

Posted 08 June 2010 - 04:51 PM

Thanks for your patience, I'm really having a hard time figuring out ds_lists haha.

But, here's the code. I just want to know. Is the ds_list it's making called list? Because after it goes through the string_parse code, I'm trying to show the information on the list it creates with this code

if(selected_game < ds_list_size(games_list)) {
	string_parse(ds_list_find_value(games_list,selected_game), "|", true) //script parse code
	show_message(ds_list_find_value(list,0)); //Trying to show information of the ds_list called list
}

But it's saying there's no such variable as "list"

{
	var str, token, ignore, list, tlen, temp;

	str = argument0;
	token = argument1;
	ignore = argument2;

	list = ds_list_create(); // I'm assuming it's creating a ds_list called list. Am I right?
	tlen = string_length( token);

	while( string_length( str) != 0) {
		temp = string_pos( token, str);
		if( temp) {
			if( temp != 1 || !ignore)
			ds_list_add( list, string_copy(str, 1, temp - 1));
			str = string_copy( str, temp + tlen, string_length( str));
		}
		else {
			ds_list_add( list, str);
			str = "";
		}
	}

   return list; // I'm assuming it's creating a ds_list called list. Am I right?
}

Edited by Noritox, 08 June 2010 - 04:54 PM.

  • 0

#33 Catan

Catan

    GMC Member

  • GMC Member
  • 278 posts

Posted 16 June 2010 - 07:02 AM

Thanks for your patience, I'm really having a hard time figuring out ds_lists haha.

But, here's the code. I just want to know. Is the ds_list it's making called list? Because after it goes through the string_parse code, I'm trying to show the information on the list it creates with this code

if(selected_game < ds_list_size(games_list)) {
	string_parse(ds_list_find_value(games_list,selected_game), "|", true) //script parse code
	show_message(ds_list_find_value(list,0)); //Trying to show information of the ds_list called list
}

But it's saying there's no such variable as "list"


Actually it's returning the list, not a variable containing the list, therefore you have to do something like this:

parsed_string_list = string_parse(blah...)
  • 0

#34 TerraFriedSheep

TerraFriedSheep

    GMC Member

  • GMC Member
  • 3185 posts
  • Version:GM:Studio

Posted 28 June 2010 - 10:43 PM

This looks amazing, it makes me want to make another online game; it would make the technicalities of players connecting to each other just be gone, I've never used PHP or mysql before though so I'm looking into how to get that part working first :)
  • 0

#35 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3538 posts
  • Version:GM:Studio

Posted 19 July 2010 - 04:23 AM

mmmm havent tried yet and it looks preety cool ( im on ubuntu and im too lazy to restart my pc :P ) but would it be possible to use netread dll to achieve this? because i have an online game that would make perfect use of this.. but it uses mplay.. and i suck at 39dll...
  • 0

#36 Catan

Catan

    GMC Member

  • GMC Member
  • 278 posts

Posted 19 July 2010 - 06:58 PM

mmmm havent tried yet and it looks preety cool ( im on ubuntu and im too lazy to restart my pc :P ) but would it be possible to use netread dll to achieve this? because i have an online game that would make perfect use of this.. but it uses mplay.. and i suck at 39dll...


I don't know very well the netread dll, but since all I do here is send and retrieve data from a php page, I'm positive it is possible to replace the 39dll with the netread dll without problems.
  • 0

#37 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3538 posts
  • Version:GM:Studio

Posted 19 July 2010 - 08:22 PM


mmmm havent tried yet and it looks preety cool ( im on ubuntu and im too lazy to restart my pc :P ) but would it be possible to use netread dll to achieve this? because i have an online game that would make perfect use of this.. but it uses mplay.. and i suck at 39dll...


I don't know very well the netread dll, but since all I do here is send and retrieve data from a php page, I'm positive it is possible to replace the 39dll with the netread dll without problems.

Yeah, just finished testing and it works like a charm. ^_^ i think its a lot easyer with netread, since you only hace to call one function to make everything (send, and reicieve data). Just write the php URL and, if the file retrieves any value it will be returned in that very same function.
The only problem i had is that you cannot use the dll39_read_sep() function, wich makes annoyinng to read the lists as lists or arrays ( you need to separate words with string_copy() and such ).
  • 0

#38 Guminuxas

Guminuxas

    GMC Member

  • New Member
  • 17 posts

Posted 20 July 2010 - 10:28 AM

<_<

Edited by Guminuxas, 20 July 2010 - 10:30 AM.

  • 0

#39 xpl0xi

xpl0xi

    GMC Member

  • New Member
  • 120 posts

Posted 19 August 2010 - 07:43 AM

This is the best ever. I cant beleive i had to go like 6 pages to find this! I thought this would be more poplular?
  • 0

#40 Guy Le Douche

Guy Le Douche

    GMC Member

  • New Member
  • 25 posts

Posted 06 November 2010 - 08:00 AM

I am sort of new to this, but, when I open the example it says 39DLL extension package cannot be found.

Any help?

PS. Sorry for being a total noob
  • 0

#41 connor4312

connor4312

    www.connorpeet.com

  • GMC Member
  • 896 posts
  • Version:None

Posted 07 November 2010 - 05:54 AM

list.php: This page retrieves the list of available games, in textual format, with information divided by a separator character. It's up to the developer to split the resulting strings. If you access the page from a browser you can see the list in an html table.
insert.php: Allows to insert, update or keep alive a game in the server. It gets the game name and the player name as parameters. The IP of the host is kept in the database therefore calling this page when you already have a game results in updating it.
delete.php: Deletes a game from the server
config.php: Conrains the data needed to connect to the database


It would be far more efficent to have ONE page, and pass variables with the get method, so say you wanted to insert, go to action.php?i=insert

ip (VARCHAR 255)
name (VARCHAR 255)
player (VARCHAR 255)
last_update (DATETIME)


Will you really have someone whose ip or name are 255 characters? IPv6, the longest version, only has 39 characters. That just increases the server load and memory usages. It would also be more efficient to assign ids to each game to use as a handle, more efficient and easier to manage that using varchars. Try this code to create your table:
create table games(ip varchar(39),name varchar(100), player  varchar(20), last_update(DATETIME), id int NOT NULL);

Edited by connor4312, 07 November 2010 - 05:55 AM.

  • 0

#42 shrekboy1

shrekboy1

    GMC Member

  • New Member
  • 116 posts

Posted 11 November 2010 - 03:24 AM

any chance of a mplay_ version of this? because it looks great, i got pretty excited, then i saw it was 39DLL.
  • 0

#43 Veerarch

Veerarch

    GMC Member

  • GMC Member
  • 35 posts
  • Version:GM:Studio

Posted 17 November 2010 - 12:00 AM

what does DLL39_format_text and DLL39_format_none do cause i cant open the gex
  • 0

#44 borut

borut

    Courage Wolf Productions

  • GMC Member
  • 1337 posts
  • Version:GM:Studio

Posted 20 November 2010 - 09:30 PM

Nevermind :) Got it solved!

Edited by mold03, 20 November 2010 - 11:50 PM.

  • 0

#45 Veerarch

Veerarch

    GMC Member

  • GMC Member
  • 35 posts
  • Version:GM:Studio

Posted 09 December 2010 - 08:34 AM

i dont know how to get the ip from ds_list still lol
HELP!
  • 0

#46 beeproductions

beeproductions

    Helping gmc users

  • GMC Member
  • 1316 posts
  • Version:GM:Studio

Posted 10 December 2010 - 01:38 PM

Nice Nice Nice
  • 0

#47 jtstanley9

jtstanley9

    GMC Member

  • GMC Member
  • 16 posts

Posted 29 July 2011 - 08:00 PM

Hmmmm....
I call the php file, and it returns multiple lines into the games_list, all which look like HTML code.
If you look at the HTML code, it was supposed to be an error display page, saying that "The server did not understand your request", with a header "Bad Request".
If I cant get this to work, I am currently working on a serverlist using FTP.
  • 0

#48 Hello-World

Hello-World

    GMC Member

  • New Member
  • 105 posts

Posted 20 September 2011 - 12:50 AM

I'm having guy de douche's problem. When I open the source code it says 39dll extension package not found. :(
  • 0

#49 Terrified Virus

Terrified Virus

    Moderators Plaything

  • GMC Member
  • 753 posts
  • Version:GM:Studio

Posted 16 February 2012 - 11:02 PM

looks really nice!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users