Basic usage of properties

Started by BoogTheObscure, 25 Feb 2022, 21:42

« previous - next »

BoogTheObscure

Hi all - I'm stuck at something, I can't figure out what I'm doing wrong.

I'm trying to set player.z in a script and have tried

player.z =2;

and

int myFeet = 2;
player.z = myFeet

but I get a parse error near 'player'. I've searched the forum and saw someone just assigning the integer to player.z like the first example, and the docs example uses it like I'd expect in a C-like language...confused!

EDIT:

Riiiight...fixed but not sure how/why. I'd tried it outside and inside functions before. I tried to show player.x in a hotspot script function and it worked, changed to player.z and it worked, and then suddenly it worked back in set_default_options() where I'd tried it before in all sorts of ways. Huh.

SMF spam blocked by CleanTalk