gms_self_isguest

Usage: gms_self_isguest ( )

Description

Returns whether the player is logged in as a guest.

Replies (13)

Last message on 3 Oct 2014

SaitoZero on 30 Sep 2014, 17:06:17
FATAL ERROR in
action number 1
of Step Event0
for object GMS:

Push :: Execution Error - Variable Get -5.__player_isguest(100468, -1)
at gml_Script_gms_self_isguest (line 1) - return global.__player_isguest;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_gms_self_isguest (line 1)
called from - gml_Script_scrLogin (line 3) - if !gms_self_isguest(){

Hmmm, look like this doesn't return boolean? What does it return??
Size43 (Administrator) on 1 Oct 2014, 12:12:14
Seems like the player info hasn't been received. Try calling the function a little later. When the login callback script is called, it should be available.
SaitoZero on 1 Oct 2014, 15:39:34
What I did is:
gms_login_execute(scrLogin);

And I have tried this in scrLogin:
switch (argument0){
case e_ok:
if gms_self_isguest(){show_message("Please enter your username and password"; gms_logout();}

What do you mean by I have to call it after calling the scrLogin? because I have

else { a bunch of codes which check if player had a character from server, if no then goto a room to create character, else... } //when player isn't guest

I just wanted to let the scrLogin manage everything, but it seems like I have to create another object to perform the check for player is guest or not, and player had a character or not, right?
Btw it seems to work fine before I tried to add gms_self_isguest();
Size43 (Administrator) on 1 Oct 2014, 15:44:31
This seems to be a server-sided bug. I've got a fix coming later today :)
SaitoZero on 1 Oct 2014, 15:56:32
Thank you, btw when a player register using my game, does it counts as a referal log in?
I mean, can I earn pixels from that?
I really love your extension, and only if I had spare money to donate, I will. I'm just a student for now, I don't have credits/debit card, I can't make money my own, and my laptop has only 1gB of RAM, too low to start a server. So many reason to love your ext :)
Size43 (Administrator) on 1 Oct 2014, 16:09:22
Just updated the server, the bug should now be fixed. Registering in-game didn't count as a referral, but it does now. ;)

Please let me know whether the bug is fixed!
SaitoZero on 3 Oct 2014, 16:29:05
FATAL ERROR in
action number 1
of Create Event
for object objGuestCheck:

Push :: Execution Error - Variable Get -5.__player_isguest(100468, -1)
at gml_Script_gms_self_isguest (line 1) - return global.__player_isguest;
##############
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_gms_self_isguest (line 1)
called from - gml_Object_objGuestCheck_CreateEvent_1 (line 1) - if !gms_self_isguest(){


I eventually tried to use another object to check for guest, still...
Just to ask, does it really return boolean?
Size43 (Administrator) on 3 Oct 2014, 18:29:49
I think I may know what's going on. Are you only seeing that error when you're logging in with an account? Try adding this code right after calling gms_init:

global.__player_isguest = false;
SaitoZero on 3 Oct 2014, 20:00:34
It worked now.

By the way, I had that error when I tried to log in as guest, too( leave username and password blank).

And another thing, everytime gms_self_isguest(); returns true, I must set global.__player_isguest back to false, or it'll say every other account that logs in after that script is guest.

Just saying this for other users to know. And you should add that to the description, too :)
Size43 (Administrator) on 3 Oct 2014, 20:08:00
I'll be fixing this in the next update. (currently I'm aiming to release 1.8 at the end of the month) I won't update documentation, as I don't think I should be documenting bugs :)
SaitoZero on 3 Oct 2014, 16:05:23
FATAL ERROR in
action number 1
of Step Event0
for object GMS:

Push :: Execution Error - Variable Get -5.__player_isguest(100468, -1)
at gml_Script_gms_self_isguest (line 1) - return global.__player_isguest;
#########
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_gms_self_isguest (line 1)
called from - gml_Script_scrLogin (line 3) - if !gms_self_isguest(){


Well, just tried, the same.
I'll try creating an object to check for guest, hope it'll work.
SaitoZero on 1 Oct 2014, 07:23:02
Btw I can't log in to my account on the site, but I can reply something, although it doesn't show that I'm logged in. It's a pain in the ass since I can't actually manage my game on the site.
Size43 (Administrator) on 1 Oct 2014, 12:07:45
I've fixed this. Please let me know if you're still having problems logging in.