ID:1843725
 
(See the best response by Lige.)
Code:
Here are where vars are defined:
atom/var
saved_x;saved_y;saved_z


Here's the problemo. I get the undefined typed error for each like that has "W.saved_" How do I fix it?
proc
SaveObjects()
var/savefile/F = new ("AO/Map.sav")
var/list/Builtstuff=new
F["Builtstuff"] << built
for(var/obj/items/W in world)
W.saved_x=W.x
W.saved_y=W.y
W.saved_z=W.z
Builtstuff+=W
F["Stuff"]<<Builtstuff


Problem description:

Here's a screenshot for your convenience: http://i.gyazo.com/0dc3fd7cf355ff91d3813bb20087f926.png
Best response
The code snippet worked for me. The only thing I can think of is that you haven't defined /obj/items anywhere.

atom/var
saved_x;saved_y;saved_z

proc/test()
for(var/obj/test/o in world)
o.saved_x = o.x
o.saved_y = o.y
o.saved_z = o.z
// will give you the undefined errors


atom/var
saved_x;saved_y;saved_z

obj/test

proc/test()
for(var/obj/test/o in world)
o.saved_x = o.x
o.saved_y = o.y
o.saved_z = o.z

// will fix the issue
One can't define things in the for line procs? It's only used to reference to things that already defined?

EDIT: Nevertheless, your solution solved my problem. Thanks bro.
In response to Oleic
Oleic wrote:
One can't define things in the for line procs? It's only used to reference to things that already defined?

EDIT: Nevertheless, your solution solved my problem. Thanks bro.

It looks like it's trying to loop through /obj/items and /obj/items does not exist.

Next time you'll want to create /obj/items (like Lige did with /obj/test) and then you can loop through with for(objects under "items" category, find "W" in the world) o being you'll find any item under the /obj/items category and that item will be selected and defined as "W", so you can reference that specific /obj/item.
Oh okay, thanks Maximus. I kind of always thought one wouldn't have to create "something" before using it in a for loop. But I guess I've always had those "somethings" created somewhere else before using them.