addstring not working?

Build: 0.8.0

I’m using this script for hats on the overworld you can find:

setshape 1,32,32;
this.hat = 44;
setimgpart hat#v(this.hat).png,96,0,48,49;

addstring clientr.hats,#v(this.hat);
setplayerprop #c, You picked up hat # #v(this.hat);
play chest.wav;
set gothat44;
if (playerenters && gothat44) {
else {


Simply put, when I touch it, then check my strings, 44 isnt being added to my clientr.hats.

Any ideas or is this a definite bug:(

You manage to find a bug a day…

But if ya want, you can use replacestring instead of addstring. It will create a new one if it doesn’t allready exist.

…Well that one is weird because addstring is local.
Addstring modifies the string on the client, client sends out the new string.
Client retains the local string, GServer gets sent a copy to save it later.

I assume you’re using or, and not (which has been known to break the hell out of scripts)

Stop testing EVERY command! There are plenty of things that don’t work and we can’t fix them.

i bet it’s because the client doesn’t allow you to alter clientr.flags on the client… (just a wild guess, but it might be true =P)

woo, i actually helped hah! different note, server. strings are read-only to the client, serverr.strings are set-able both ways. (except we don’t have an npc-server, so theres no point for serverr.* flags)

Aye, clientr would be one of those Serverside/NPC-Server only things, to make it read only.

Aye, clientr/serverr.vars were added to only be editable on the serverside, and read-only on the clientside(because it’s a lot harder to have the server rather than clientside memory).

Gah in the back of my mind, seeing the r on the end of client made me think of thisas well, i just didn’t mess with it. Thanks for the insight guys.

___Merged doublepost__________________

Luckily for me I’m not looking for bugs. I just happen to come upon them when trying to make something work :B.