Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-06-05 23:51:59, last edited by Trung (2017-06-06 01:01:35)

Trung
Member
From: Home sweet home :3
Joined: 2015-02-15
Posts: 109

Some question related to username

I'm really stuck at this...

1) How to convert player id (not simple id) to username? What EE protocol message need to send or receive to get that beside "add"?

2) Get list of current users in the room with their id and username?

If possible, include code snippet example?


Say hello to my army :
Ufl8CL9.png
time.gif

Offline

#2 2017-06-05 23:59:35, last edited by SirJosh3917 (2017-06-06 00:08:57)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: Some question related to username

ok its rlly simlple1:

1) in the bigdb called Usernames, you fetch a key the username, e.g. "benjaminsen". Then, in the table, there is a slot called "owners",    if you fetch that, it'll return "simpleChris"

2) playerio.listrooms() or something and itll give you all of that

you can't find online users like that however

code snippits here

static void Main(string[] args) {
	//Get SimpleId of benjaminsen
	Console.WriteLine(GetSimpleId("benjaminsen"));
	//Get Username of simpleChris
	Console.WriteLine(GetUsername("simpleChris"));
	//List rooms
	var rooms = guest.Multiplayer.ListRooms("Everybodyedits221", null, 0, 0);
	Console.ReadLine();
}

public static bool CreatedGuestClient = false;
public static PlayerIOClient.Client guest;
public static string GetSimpleId(string username) {
	if(!CreatedGuestClient)
		guest = PlayerIOClient.PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "[email protected]", "guest", null);
	return guest.BigDB.Load("Usernames", username)["owner"].ToString();
}

public static string GetUsername(string simpleid) {
	if (!CreatedGuestClient)
		guest = PlayerIOClient.PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "[email protected]", "guest", null);
	return guest.BigDB.Load("PlayerObjects", simpleid)["name"].ToString();
}

It's not possible to list the online players in a world individually unless you join and send "init2"

Please keep in mind that these functions are not designed to handle any errors, error checking will have to be included by you.

Offline

#3 2017-06-06 00:56:55

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: Some question related to username

All of those questions have been answered before. Please use the forum search feature.

Don't ask to be spoonfed code.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#4 2017-06-06 00:59:12

soniiiety
Member
From: peaceful dojo
Joined: 2016-02-10
Posts: 1,752

Re: Some question related to username

the fourm search feature doesnt work that well etc maybe i did use it thought buit you have to be exact or it wont find it etc so idk


de543c4c-ed76-4170-896f-8fa2a5183225_1_784x184.jpg?ex=667f757e&is=667e23fe&hm=b6817d138e71c14a2bdbf73bbe7213a5d2d1b7300d78449d1f0fe240e603ab04&

Offline

#5 2017-06-06 01:02:28, last edited by Trung (2017-06-06 01:26:34)

Trung
Member
From: Home sweet home :3
Joined: 2015-02-15
Posts: 109

Re: Some question related to username

Tomahawk wrote:

All of those questions have been answered before. Please use the forum search feature.

Don't ask to be spoonfed code.

soniiiety wrote:

the fourm search feature doesnt work that well etc maybe i did use it thought buit you have to be exact or it wont find it etc so idk

As said from soniiety, search feature is trash //forums.everybodyedits.com/img/smilies/sad

Btw ninja, I forgot to specify that player id, not simple id, and thank for helping me

Edit: OK found a way around with it, lock the thread if you want

Will include these words for future search:

username convert  playerId simpleId init2


Say hello to my army :
Ufl8CL9.png
time.gif

Offline

#6 2017-06-06 01:06:36

soniiiety
Member
From: peaceful dojo
Joined: 2016-02-10
Posts: 1,752

Re: Some question related to username

yes that right we we all used search then there would not be any new threads and we wouldn't post as much  plus if they do fix it it will still hard to use it i think unless they explain how top use it then we would have more searchees


de543c4c-ed76-4170-896f-8fa2a5183225_1_784x184.jpg?ex=667f757e&is=667e23fe&hm=b6817d138e71c14a2bdbf73bbe7213a5d2d1b7300d78449d1f0fe240e603ab04&

Offline

soniiiety1496707596662930

Board footer

Powered by FluxBB

[ Started around 1732964446.243 - Generated in 0.051 seconds, 13 queries executed - Memory usage: 1.43 MiB (Peak: 1.56 MiB) ]