for(var/mob/Robot/S in world)
ActiveRobots.Add(S.name)
save["[S.name]_name"] << "[S.name]"
save["[S.name]_x"] << "[S.x]"
save["[S.name]_y"] << "[S.y]"
save["[S.name]_z"] << "[S.z]"
usr << "\green The Robot List has been saved!"
The Saving proc is working just fine, posted just for reference. The list (ActiveRobots) is created with:
var/world/list/ActiveSagas = new /list
Load Code:
var
Bot_x
Bot_y
Bot_z
for(var/CBot in ActiveRobots)
var/SPath = text2path("/mob/Robot/[CBot]")
var/mob/EBot = new SPath()
load["[CBot]_x"] >> Bot_x
load["[CBot]_z"] >> Bot_y
load["[CBot]_y"] >> Bot_z
EBot.loc = locate(Bot_x,Bot_y,Bot_z)
ActiveRobots -= CBot
usr << "\green The Sagas have been successfully Loaded!"
Problem description:
The code is supposed to Save all the Robots currently on the map, then Load them later on to the same place they were at..
But I keep getting the following error:
runtime error: Cannot create objects of type null.
proc name: Robo Load (/proc/Robo_Load)
usr: Dolev (/mob/Player)
src: null
call stack:
Robo Load()
Dolev (/mob/Player): Robo Load()
..Any help? I've been at it for hours..
Thanks in advance for anyone willing to help :)