In my coding:
for(var/turf/house/o in objs)
o.loc = locate(o.lastx, o.lasty, o.lastz)
How can I fix this error?
ID:175208
![]() May 26 2003, 2:44 pm
|
|
For some reason I get the error: Obj Saving.dm:9:error:o.loc:cannot change constant value
In my coding: for(var/turf/house/o in objs) How can I fix this error? |
![]() May 26 2003, 2:45 pm
|
|
You can't change the loc of turfs.
|
Oh...So I have to make them objs? If so does that cause more lag in the game because im trying to save the players built houses...
|
You could make them objs, but you don't have to. If you'd rather stick with turfs, just make a new turf at the location. So instead of <code>o.loc=locate(...)</code>, it's <code>var/turf/T=new o.type(locate(...))</code> (and then set whatever of T's vars are important to be loaded, to o's equivalent var. For example, you might set T.houseowner=o.houseowner).
|