Forum BigDB PlayerObjects created on server bug?

Discussion and help relating to the PlayerIO database solution, BigDB.

PlayerObjects created on server bug?

Postby UnknownGuardian » January 25th, 2011, 4:55 am

I don't know if this is intentional or not, but I'd like to have it changed if possible. My serverside UserJoin creates a PlayerObject if the player doesn't have one already. The client side loads the PlayerObject later on and then saves it. But doing so throws an error saying the PlayerObject wasn't created by the client (which it was created by the server on the client's join). Could this be changed so any PlayerObjects created/saved/whatever serverside will have permission granted to the client that cause it do be created/saved/whatever?

Also, I can't seen to change the edit rights to my PlayerObjects, which I assume was intentional. It might be good to have this editable at some point, if users don't want to mess around with mutliple DBs and know what they are doing.
UnknownGuardian
 
Posts: 94
Joined: May 25th, 2010, 5:11 am

Re: PlayerObjects created on server bug?

Postby Benjaminsen » January 25th, 2011, 8:54 am

When you create the PlayerObject manually on the server, the object does not belong to the Player. The simple fix is to set PreloadPlayerObject to true in game started.

This will auto load/create the player object for you.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: PlayerObjects created on server bug?

Postby Oliver » January 25th, 2011, 3:12 pm

It's because you're creating the playerobject manually. You shouldn't do this, but rather use the GetPlayerObject() method (http://playerio.com/documentation/refer ... ayerObject) to load (or create) the player object.

Or, as Chris mentions, use the PreloadPlayerObject option.

what do you mean by this:
Also, I can't seen to change the edit rights to my PlayerObjects, which I assume was intentional. It might be good to have this editable at some point, if users don't want to mess around with mutliple DBs and know what they are doing.


You can't change the access rights on tables in the admin panel? or do you mean that you can't change the creator of an object?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: PlayerObjects created on server bug?

Postby UnknownGuardian » January 26th, 2011, 2:09 am

In my Game's constructor I have PreloadPlayerObject set to true.
Code: Select all
public override void GameStarted() {
//load all player objects
PreloadPlayerObjects = true;
// anything you write to the Console will show up in the
// output window of the development server
Console.WriteLine("Game is started");
}


And I mean I can't change access rights on the PlayerObjects table via the admin panel.


And as a side note, I've solved my original problem another way, (ping the server with a message to update rather than load the playerobject then update then send back) which works out better since is a lot more secure.
UnknownGuardian
 
Posts: 94
Joined: May 25th, 2010, 5:11 am

Re: PlayerObjects created on server bug?

Postby Oliver » January 27th, 2011, 1:52 pm

And I mean I can't change access rights on the PlayerObjects table via the admin panel.


Really? Do you get an error message or anything?
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: PlayerObjects created on server bug?

Postby UnknownGuardian » January 27th, 2011, 10:24 pm

Nope, the changes I make just don't seem to save.
UnknownGuardian
 
Posts: 94
Joined: May 25th, 2010, 5:11 am

Re: PlayerObjects created on server bug?

Postby Oliver » January 28th, 2011, 11:04 am

There are two places you can change access rights for a BigDB Table: When editing settings for a connection and when editing a table in the BigDB section of the admin panel.

Which one do you use, and does it fail in both?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: PlayerObjects created on server bug?

Postby UnknownGuardian » January 29th, 2011, 3:44 am

I was doing it in the BigDB section. However, doing it via the Connection does work apparently.
UnknownGuardian
 
Posts: 94
Joined: May 25th, 2010, 5:11 am

Re: PlayerObjects created on server bug?

Postby trycatchgames » May 31st, 2011, 1:41 am

Bumping this thread. I have the same problem when editing a table under the BigDB -> PlayerObjects -> Edit Table, edit the settings then hit "Save Changes". Then come back into the Table and none of the settings save. No errors as it looks like it works but nothings sticks. I have tried both Firefox and Chrome and it doesn't work there.

Where it does work is under the Settings link. There I was able to set the "Load By Indexes" option and it saved. Let me know if you need any further data to troubleshoot.
trycatchgames
 
Posts: 21
Joined: March 25th, 2011, 2:39 am

Re: PlayerObjects created on server bug?

Postby Oliver » May 31st, 2011, 9:55 am

Hey,

Thanks for the report. We'll get it looked at again, and hopefully we'll be able to reproduce and fix it this time.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: PlayerObjects created on server bug?

Postby Henrik » June 15th, 2011, 4:42 pm

Fixed.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB