This site requires JavaScript, please enable it in your browser!
Greenfoot back
Game/maniac
Game/maniac wrote ...

2013/12/17

Request to devs of Greenfoot site

Game/maniac Game/maniac

2013/12/17

#
Could you add the ability to reset the UserInfo data please?
JetLennit JetLennit

2013/12/17

#
I second this
danpost danpost

2013/12/17

#
You could program a flag into the UserInfo data and show only those stats that the flag was set in. If user runs the scenario online and the flag is not set, set it, reset the data and store the info.
GreenHouse GreenHouse

2013/12/17

#
number 6 is still free? :D code for GreenfootUtilDelegateStandAlone implements GreenfootUtilDelegate
@Override
public void deleteUserInfo(String userName)
{
	if (userName == null || userName.equals(""))
		userName = "delete_all_data";
	
	try
	{
		ensureStorageConnected();
		ByteBuffer buf = makeRequest(1 + 2 + (2*userName.length()));
		buf.put((byte) 4);
		putString(buf, userName);
		buf.flip();
		socket.write(buf);
		
		buf = readResponse();
		int response = buf.getInt();
		
		if(response!=0)
			throw new GreenfootStorageException("Error communicating with server: " + e.getMessage());
	}
	catch (IOException e)
	{
		closeConnection(e);
	}
	catch (GreenfootStorageException e)
	{
		closeConnection(e);
	}
}
Pls implement this possibility into the storage server :)
lordhershey lordhershey

2013/12/17

#
No; Number six is currently stuck in the 'Village'
GreenHouse GreenHouse

2013/12/17

#
I asked him, number six is still free, even on holidays.
bourne bourne

2013/12/17

#
Funny I made this request a couple days ago to a dev, though I found a solution to my circumstance. @danpost, a scenario might depend on the UserInfo of all users (and a "version" number might not have been implemented), so "old" saved UserInfos that might not login again may get in the way (anywhere you would want to store a "flag" could have previously been used for something else). It would be ideal in some circumstances to wipe the UserInfo storage on a scenario as the scenario evolves.
danpost danpost

2013/12/17

#
@bourne, I understand where you are coming from, but one unused bit (not byte) is all it would take. And 'old' scenarios would not have the bit set, so your program can ignore those (not letting them get in the way). Sure, it would be a whole lot easier if maybe the 'Share' window had a checkbox to indicate whether the UserInfo data should be reset or not (default); but until then (if ever), this would appear to be the way to go.
bourne bourne

2013/12/17

#
@danpost, I realize that, especially as I have delegated meaning at the bit level across both strings and ints for UserInfos. It just would be nice to not have to accommodate for past saving schemes when old schemes are indistinguishable or ancient (and hopefully the data is expendable).
You need to login to post a reply.