This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

RcCookie
RcCookie presents ...

2021/2/12

Messager

This is my version of a simple messager system using the UserInfo class. You can send other people messages that only they can see (and the author, me).

You can have up to 5 messages sent to others concurrently, after that the oldest one will be deleted. This is a limitation of the UserInfo class.

The system works by storing the messages in the String slots of the sender's UserInfo object. In the integer slots, it stores the hashed target user that should recieve the message, and the time stamp at which the message was sent.
Because the username of the target user has to be hashed (converted to an integer) because of storage limitations, the target user cannot simply be read out. Because of that you may see 'User could not be loaded' in a sent message. Once the other person opened this scenario for at least once the name will show up though.

3349 views / 24 in the last 7 days

8 votes | 0 in the last 7 days

Tags: mouse demo with-source communication text online message chat communicate

This scenario is a member of: UNiTy iN NeEd


open in greenfoot
Your browser does not support the canvas tag.
Goku555Goku555

2022/4/19

O
Goku555Goku555

2022/4/19

K
Goku555Goku555

2022/4/19

At
Goku555Goku555

2022/4/19

My
Goku555Goku555

2022/4/19

New
Goku555Goku555

2022/4/19

Me
Goku555Goku555

2022/4/19

Ss
Goku555Goku555

2022/4/19

Ag
Goku555Goku555

2022/4/19

E
<p>Some</p><p>Some</p>

2022/5/3

Check inbox

See all comments

Want to leave a comment? You must first log in.

Who likes this?

LIU-25535 Greenfoot_Admin Gabe1098 rocket770 Game/maniac BogdanMicu Roshan123