ID:141924
 
Code:
var/turf/T = new/turf/anything
T.loc = locate("move here")


Problem description:
This gives a runtime of can't edit a constant value. I am looking for a way to move turfs do to a bug that moves them from their original location.

Turfs never move - they can't - hence their location vars (loc,x,y,z) are constant and can't be changed.
Only descendants of /atom/movable can move, their location vars can be changed and they also have a Move() procedure.

When creating a new turf, you're supposed to pass the initial location (an old turf to replace) in new()'s first argument - that's the location. The turf will be created at the spot of the old turf used, and virtually replace it (though this might not be completely the case).
In response to Kaioken
Therefore, his problem of the turfs moving might actually be worthy of a bug report, unless he messed up on some coding which I don't think is likely to cause such a bug to happen.
In response to Andre-g1
That's she, and the only thing I can see causing it is a system I made so people can log out and keep their location, but this only applies to special turfs and those turfs aren't the one's moving. I have had issues with the game randomly moving turfs during a compile though this bug doesn't happen at compile time.
In response to Andre-g1
Her problem could be caused by all sorts of things, most likely definitely not turfs actually moving, but turfs being unexpectedly created/deleted, etc. It might appear they may be moving, but it is not necessarily the case. Either way I'm not telepathic, so I couldn't tell what the problem really is like this.
In response to Dpheonix7
Dpheonix7 wrote:
That's she


Sorry, had no idea.
Turfs cannot move by definition, so you're seeing something else happening, such as the saved data from a turf being loaded into a different one. (In general you shouldn't be saving turfs though, at least not in raw form, because if someone's standing on them you can end up with a "rollback" issue.)

Lummox JR
In response to Andre-g1
No prob. Happens alot when mainly only males play and program.
In response to Lummox JR
How I set it up is that the turf's location is saved in the mob and the mob just moves to the x,y,z saved in the location. I don't actually save the turf.
In response to Dpheonix7
Dpheonix7 wrote:
How I set it up is that the turf's location is saved in the mob and the mob just moves to the x,y,z saved in the location. I don't actually save the turf.

I'm not sure how you'd be seeing turfs "move" without having saved and loaded them directly, then. I do suspect the issue is something in your code though.

Lummox JR