mob
verb
replaythrow(mob/M in view(2))
looping
var/turf/replay/S = new/turf/replay
S.loc = locate(M.x-1, M.y, M.z)
Problem description:reply.dm:8:error: S.loc: cannot change constant value
Code:
mob Problem description:reply.dm:8:error: S.loc: cannot change constant value |
I hope you don't do this for every object you create. It tells you in the DM Reference what the "new" instruction does and how it is supposed to be used to set the initial location of whatever atom is being created. You read that when you learned about "new" in the Guide or the DM Reference, right?
|
I was trying to make it so when this verb is used, the turf gets placed where the other person is
|
there is already a turf btw,
turf/replay then its that code |
It says reply.dm:7:warning: S: variable defined but not used
var/turf/replay/S = new (locate(M.x-1, M.y, M.z)) |
In response to Naruto 5292
|
|
Naruto 5292 wrote:
It says reply.dm:7:warning: S: variable defined but not used > var/turf/replay/S = new (locate(M.x-1, M.y, M.z)) Then don't create a variable.
new/turf/replay/(locate(M.x-1, M.y, M.z))
|
hey just wanted to know, is it possible to make it a loop? like adding goto loop or osmthing
|
// heres how i imagine it. |
In response to Hebrons
|
|
Hebrons wrote:
id have to disagree about turfs not being able to move.... -_- The reference disagrees with you: http://www.byond.com/docs/ref/info.html#/turf |
Your only choices are to either make a new turf at the desired location, or modify the turf that is already there.
EDIT: Hmm, I didn't even realize you were already creating another turf. Do it like this: