I USE the login button which is the drag andDrop button. If thats the wrong way whats the right way?You don't seem to be logging in correctly, and you are most likely kicked (or not even connected) when you see that error message. What code do you use to login/connect?
Greenhawk1997
GameMaker Server
#281
Posted 10 June 2012 - 05:27 PM
#282
Posted 10 June 2012 - 07:22 PM
If it isn't, can this show a list of hosts?
#283
Posted 10 June 2012 - 08:15 PM
So is this like a dedicated server?
If it isn't, can this show a list of hosts?
go to page 1 of this topic and the download lkink is there. Its a multiplayer exyemsion gthat makes online games 100 million times easier. Just about in that case.
#284
Posted 11 June 2012 - 05:23 AM
get_string to ask user to type in a name and password.
server_login_check_username with the entered name (not sure what "blocking is)
server_login_code_is_valid to check if the password is correct
then finally server_login_execute();
also have user defined events 14 and 15
does that seem right or am i totally failing?
(ignore the possible bad user inputs and **** like that for now)
EDIT: also it seems like you have server_set_password and server_set_code... what is the difference?
Edited by StickofDoom, 11 June 2012 - 05:23 AM.
#285
Posted 11 June 2012 - 12:13 PM
there's just one host. It's like every registered game has it's own 'virtual' serverSo is this like a dedicated server?
If it isn't, can this show a list of hosts?
I guess it's a fault on my side. The documentation just isn't up to what it's on the dutch side...Okay, so I wanted to try to make my own login screen/window, and this is basically what i tried:
get_string to ask user to type in a name and password.
server_login_check_username with the entered name (not sure what "blocking is)
server_login_code_is_valid to check if the password is correct
then finally server_login_execute();
also have user defined events 14 and 15
does that seem right or am i totally failing?
(ignore the possible bad user inputs and **** like that for now)
EDIT: also it seems like you have server_set_password and server_set_code... what is the difference?
Anyway:
It's bad to store passwords in-game (it's 99.9% of the time unencrypted), because it gives you access to the whole account, not just to one game. And that's why there are logincodes: They are only valid for one session, and get refreshed all the time. So instead of storing passwords, it just stores that code. (If you use the default login window, it looks like it saves you password, but it just stores the code and length of your password)
/rant
A piece of code:
server_connect();
var user;
user = get_string("Username",server_last_username());
server_login_set_username(user);
if(server_login_check_username(user,1))
{
if(server_login_has_saved_code(user))
{
server_login_set_code(server_login_get_saved_code(user));
}else{
server_login_set_password(get_string("You need a password:","MySecretWord"));
}
}
if(server_login_execute())
{
room_goto(room0)
}else{
show_message("ERROR")
}
By the way, event user 14 and 15 only work wwhen using the default login window. Otherwise you'll have to rely on server_execute (and server_isloggedin)server_login_check_username: When blocking is disabeled, it will just send a request to the server, and as long as the server hasn't answered, it returns -1. When blocking = true, it will wait for the server to respond, and immediately returns true or false. So using if(server_login_check_username(user, 0)) will NOT work, because -1 is treated as true. When using if(server_login_check_username(user, 1)) it will work, because in that case it never returns -1.
Edit #1:there's just so much to tell
You cannot check whether a password is right. It will tell you when actually logging in. (So you can't easily brute-force the password)
Until the 20th, I am busy learning so-called "useful" things. I will not be able to respond as quickly as normal. Work on GMS & GMS+ will be resumed aftwards.
I have finally discovered the bug that's most likely causing every chat message to be from the same person. It's a big bug, I will have to edit over 50 scripts. So that's going to take a while. I hope to update the 20th
Edited by size43, 11 June 2012 - 12:14 PM.
#286
Posted 11 June 2012 - 12:26 PM
You did install the extension, right?i keep getting this error ___________________________________________FATAL ERROR inaction number 2of Create Eventfor object obj_login:COMPILATION ERROR in code actionError in code at line 1: server_settings(1,argument2,argument0,argument1); ^at position 1: Unknown function or script: server_settingsMaybe i forgot to do smth?
YeapYou did install the extension, right?
Bump.
#287
Posted 11 June 2012 - 12:36 PM
Sorry
You did install the extension, right?i keep getting this error ___________________________________________FATAL ERROR inaction number 2of Create Eventfor object obj_login:COMPILATION ERROR in code actionError in code at line 1: server_settings(1,argument2,argument0,argument1); ^at position 1: Unknown function or script: server_settingsMaybe i forgot to do smth?
YeapYou did install the extension, right?
Bump.
Are you using an example to test? Or a completely new game?
#288
Posted 11 June 2012 - 02:05 PM
[quote name='size43' date='11 June 2012 - 08:36 PM' timestamp='1339418181' post='3987241']
Sorry
Are you using an example to test? Or a completely new game?
[/quote]
It's Okay :D
I tested with the example, it works fine
thn i try to make a new game for a try. Then, it shows the error
#289
Posted 11 June 2012 - 08:42 PM
#290
Posted 12 June 2012 - 09:42 AM
If you did move the GameMaker Server extension to the 'using extensions' list, and it doesn't work, you probably have a problem with GameMaker
Sorry
Are you using an example to test? Or a completely new game?
It's Okay
I tested with the example, it works fine
thn i try to make a new game for a try. Then, it shows the error
You should tell gamemakerserver that the variables must be synced. So:i can't seem to get this to work for the life of me. im trying to do a loot dropping system by using one object obj_loot to with different variables. I can't seem to sync the object with the other players, along with all the variables being the same. The copied objects always just get default values. Anybody got any ideas?
server_instance_sync_once(id, "variable1", "variabl2", etc...)
(It saves huge amounts of CPU and bandwith using server_instance_sync_once. You could eventually sync an other instance that destroys itself and obj_loot on collision, because server_instance_sync_once doesn't)
#291
Posted 12 June 2012 - 12:36 PM
i use this extension but i can't find how to draw the names of the players who are in the current lobby i tried this:
draw_text(272,64,"1 " +server_player_name(0))
draw_text(272,80,"2 " +server_player_name(1))
draw_text(272,96,"3 " +server_player_name(2))
draw_text(272,112,"4 " +server_player_name(3))
draw_text(272,128,"5 " +server_player_name(4))
...
Until i got 10 lines of those
But the problem is that when the first player joins the lobby he can see his name on top of the playerlist but also next to player 4 like this
1 Guest_1
2 0
3 0
4 Guest_2
5 0
6 0
7 0
8 0
9 0
10 0
and when someone else joins this happened in the vieuw of Guest_1
1 Guest_1
2 Guest_2
3 Guest_1
4 Guest_2
...
and in the vieuw of Guest_2 where all Guest_1's chanched into Guest_2 and the Guest_2's chanched into Guest_1
Please help
PS dutch is also my native language
#292
Posted 12 June 2012 - 02:10 PM
You are going in the right direction.Hi,
i use this extension but i can't find how to draw the names of the players who are in the current lobby i tried this:
draw_text(272,64,"1 " +server_player_name(0))
draw_text(272,80,"2 " +server_player_name(1))
draw_text(272,96,"3 " +server_player_name(2))
draw_text(272,112,"4 " +server_player_name(3))
draw_text(272,128,"5 " +server_player_name(4))
...
Until i got 10 lines of those
But the problem is that when the first player joins the lobby he can see his name on top of the playerlist but also next to player 4 like this
1 Guest_1
2 0
3 0
4 Guest_2
5 0
6 0
7 0
8 0
9 0
10 0
and when someone else joins this happened in the vieuw of Guest_1
1 Guest_1
2 Guest_2
3 Guest_1
4 Guest_2
...
and in the vieuw of Guest_2 where all Guest_1's chanched into Guest_2 and the Guest_2's chanched into Guest_1
Please help
PS dutch is also my native language
draw_text(272,64,"1 " +server_player_name(server_player_get(0))) draw_text(272,80,"2 " +server_player_name(server_player_get(1))) draw_text(272,96,"3 " +server_player_name(server_player_get(2))) draw_text(272,112,"4 " +server_player_name(server_player_get(3))) draw_text(272,128,"5 " +server_player_name(server_player_get(4)))
There's a bug in the server_player_name code right now, so you might see everyone as your name. I'll fix it next week.
So:
-Nth player
-Player ID
-Other player instanceID
are 3 different numbers
PS. Why not join the Dutch GameMaker community?(http://www.game-make...ums/topic,69556)
#293
Posted 12 June 2012 - 05:28 PM
You are going in the right direction.
Hi,
i use this extension but i can't find how to draw the names of the players who are in the current lobby i tried this:
draw_text(272,64,"1 " +server_player_name(0))
draw_text(272,80,"2 " +server_player_name(1))
draw_text(272,96,"3 " +server_player_name(2))
draw_text(272,112,"4 " +server_player_name(3))
draw_text(272,128,"5 " +server_player_name(4))
...
Until i got 10 lines of those
But the problem is that when the first player joins the lobby he can see his name on top of the playerlist but also next to player 4 like this
1 Guest_1
2 0
3 0
4 Guest_2
5 0
6 0
7 0
8 0
9 0
10 0
and when someone else joins this happened in the vieuw of Guest_1
1 Guest_1
2 Guest_2
3 Guest_1
4 Guest_2
...
and in the vieuw of Guest_2 where all Guest_1's chanched into Guest_2 and the Guest_2's chanched into Guest_1
Please help
PS dutch is also my native languageThe player ID will increment on every login, and will never decrease. What you are looking for, is server_player_get(n) that will return the player_id of the Nth player online. And you can use the player_id, to get the right player name.
draw_text(272,64,"1 " +server_player_name(server_player_get(0))) draw_text(272,80,"2 " +server_player_name(server_player_get(1))) draw_text(272,96,"3 " +server_player_name(server_player_get(2))) draw_text(272,112,"4 " +server_player_name(server_player_get(3))) draw_text(272,128,"5 " +server_player_name(server_player_get(4)))
There's a bug in the server_player_name code right now, so you might see everyone as your name. I'll fix it next week.
So:
-Nth player
-Player ID
-Other player instanceID
are 3 different numbers
PS. Why not join the Dutch GameMaker community?(http://www.game-make...ums/topic,69556)
Thanks and i don't join the dutch gamemaker community because i think the english forums are better.
#294
Posted 13 June 2012 - 10:33 PM
#295
Posted 15 June 2012 - 04:35 PM
You might wanna check show_message(server_status(server_status_string())) right after the server_login_execute, to verify you're really logged insomeone help. I did the custom password code that was recemtly shown by size43. everytime i play online with someone, it says im not connected Help this is preventing me from playing and finishing my game. The obj player has a player parent when online too. So if that helps
And....:
GameMaker Server - Update 13.6
Fixes problems related to strange error codes, data that's not properly sent or not at all sent to the server, data not being received at all and several functions like server_instance_sync_once and server_player_name not working. This bug only occurred @ GM8.0.
Download, as always: http://gamemakerserver.tk/download/
Enjoy!
And as GameMaker Server+ is getting closer to release, I've updated the feature list, now featuring about 50 features. See http://gamemakerserver.tk/plus/
Edited by size43, 15 June 2012 - 05:00 PM.
#296
Posted 15 June 2012 - 06:30 PM
#297
Posted 16 June 2012 - 08:26 AM
Basically, there was a bug in the argument_count script for GM8.0. But the error codes it generated were all non-existent (for example: -326824)sorry foe being slow. but what were the errors that were mesing up the extension?
#298
Posted 17 June 2012 - 12:33 PM
#299
Posted 17 June 2012 - 08:56 PM
___________________________________________
COMPILATION ERROR in extension package GameMaker Server
Error in code at line 6:
if(gamemaker_version<=800){var a,i,argument_count;a=0;for(i=0;i<16;i+=1){if(string(argument[i])!="0"){a=i+1;}}argument_count=a;}
^
at position 37: Cannot redeclare a builtin variable.
#300
Posted 18 June 2012 - 11:17 AM
That'd be a bit overkill I think. In theory it's possible, but it's like buying a bus company to get a list of bus stops..Thanks, I don't want to rewrite my whole netcode, would this allow me to have a server list? I am just looking for a strait answer thanks.
___________________________________________
COMPILATION ERROR in extension package GameMaker Server
Error in code at line 6:
if(gamemaker_version<=800){var a,i,argument_count;a=0;for(i=0;i<16;i+=1){if(string(argument[i])!="0"){a=i+1;}}argument_count=a;}
^
at position 37: Cannot redeclare a builtin variable.
:/ GameMaker...Just give me an hour to fix it
Here you go:
GameMaker Server - Update 13.7
Fixed a bug caused by a bugfix in Update 13.6
http://gamemakerserver.tk/download/
Edited by size43, 18 June 2012 - 11:27 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









