#What is wrong in my test code

1 messages · Page 1 of 1 (latest)

cinder raptor
#

Let see...

#

In the first one there is a typo

#

e.souce -> e.source

#

In the second one you need to use JSON.stringify instead of JSON.parse

#

Now you are getting the dynamic property but you are not parsing it

#
const player = e.source;
const property = player.getDynamicProperty(player.name + "_test");
if (!property) return;

const data = JSON.parse(property);
player.sendMessage(data.name);