#[Dev-Script] pData_clear

21 messages · Page 1 of 1 (latest)

hasty mesa
#

wait what does that work

#

bc at least to me it really shouldnt

#

it should be players[0].persistentData = {}

crisp grove
#

why not?

hasty mesa
#

bc your setting a const to a value, that's like the one limitation of const

crisp grove
#

oh bcause of the const

#

yea

#

also i just noticed,
let players will error ur script on world load, as its null

hasty mesa
#

also even if that was mutable, that would just set the variable not the persistentData cuz javascript doesn't work like that

crisp grove
crisp grove
hasty mesa
#

huh that's so weird

#

rhino bugginess ig

crisp grove
#

this is what i do like 99% of the time handling persistentData

hasty mesa
#

well no that's different

#

cuz you're accessing a variable on persistentData

#

not directly setting it

#

bc like for example

let a = { z: 2 };
let b = a;
b = {}; 
a; // { z: 2 }
b; // { } 
crisp grove
#

yep, scrap this... i thought it worked. but it doesnt... ill be back to fix this!

hasty mesa
#

sorry abt that 😅