Jump to content


Photo
- - - - -

Online Games List


  • Please log in to reply
48 replies to this topic

#21 nbeerbower

nbeerbower

    GMC Member

  • GMC Member
  • 467 posts

Posted 21 May 2010 - 10:18 PM

@Noritox
Only one string is sent, you need to separate the IP from the rest of the string.
See: http://www.gmlscript...pt/string_parse

@guppylover
No errors? Navigate to the list.php's location and check. Make sure you have the table set up in your MySQL database too.
  • 0

#22 Noritox

Noritox

    GMC Member

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

Posted 21 May 2010 - 11:15 PM

Ah I see, thanks for the info that helps!
  • 0

#23 guppylover

guppylover

    GMC Member

  • New Member
  • 112 posts

Posted 22 May 2010 - 10:22 AM

i have data base up an location seems ok
it finds files it just dosn't use em
  • 0

#24 Catan

Catan

    GMC Member

  • GMC Member
  • 220 posts

Posted 22 May 2010 - 07:25 PM

i have data base up an location seems ok
it finds files it just dosn't use em

Can you be a little bit more specific? It's difficult to help you with so little information

Edited by Catan, 22 May 2010 - 07:25 PM.

  • 0

#25 guppylover

guppylover

    GMC Member

  • New Member
  • 112 posts

Posted 22 May 2010 - 07:37 PM

ill try it again just now
EDIT: got it working thanks
it was a host error i made it save whatever data it recived in a txt file and server was sending tracking data but disabled now

Edited by guppylover, 22 May 2010 - 08:14 PM.

  • 0

#26 Catan

Catan

    GMC Member

  • GMC Member
  • 220 posts

Posted 23 May 2010 - 08:08 PM

Awesome, implemented it into my game and it works fine. Thanks for this! Do you have a logo I can put in my credits?


You don't need to credit me for this, but it would be nice to know which games use it :) . Just drop me a note if you publish the complete game somewhere.
  • 0

#27 Jucarave

Jucarave

    GMC Member

  • GMC Member
  • 18 posts

Posted 24 May 2010 - 03:50 PM

Awesome, this is exactly what i was looking for.

Thanks.
  • 0

#28 Noritox

Noritox

    GMC Member

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

Posted 03 June 2010 - 12:19 AM

Could someone please explain how exactly I'm to implement the string_parse code?


Any info can help. If someone explains what to do, I'll post this example with the string_parse code added in this thread to help others :blink:

I've read everything i can read about lists, and I can't figure this thing out for some reason

Edited by Noritox, 04 June 2010 - 02:38 AM.

  • 0

#29 Catan

Catan

    GMC Member

  • GMC Member
  • 220 posts

Posted 04 June 2010 - 09:43 AM

Could someone please explain how exactly I'm to implement the string_parse code?

Any info can help. If someone explains what to do, I'll post this example with the string_parse code added in this thread to help others :wacko:

I've read everything i can read about lists, and I can't figure this thing out for some reason


You don't really need to program it yourself, there are a lot of ready to be used scripts on the net like this one http://www.gmlscript...pt/string_parse
  • 0

#30 Noritox

Noritox

    GMC Member

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

Posted 06 June 2010 - 01:39 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);

Edited by Noritox, 06 June 2010 - 01:40 AM.

  • 0

#31 Catan

Catan

    GMC Member

  • GMC Member
  • 220 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
  • 260 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
  • 220 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
  • 2819 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
  • 2847 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
  • 220 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
  • 2847 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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users