ID:264483
 
Code:
//run time error
BYOND: failed to find cache entry 4294967295 in (null).
proc name: load (/client/proc/load)
source file: I. Main.dm,42
usr: null
src: Nellek (/client)
call stack:
Nellek (/client): load()
Nellek (/client): New()

//the code
load()
var/client_file = Import()
if(client_file)
var/savefile/F = new(client_file)
if(mob.color)
F["color"] >> mob.color //read the player's mob
if(mob.color=="green") mob.color = "#[rand(10,99)][rand(10,99)][rand(10,99)]"


Problem description:
...the run time error obviously says something is wrong, but not what...
Can you show what line 42 is?

Pres CTRL + G and put in 42, and tell us what it is...
In response to Toushiroa
Oh, forgot to post that.
Line 42 is the var/savefile line
I think the issue may be in your saving procedure, as a quick look through the DM reference states that Import() will return null if it can't find the file your looking for.

By the way, its not typically a good idea to copy the example straight out of the DM reference.
In response to Jotdaniel
That's why it checks if client_file is null or not.

Anyways: I didn't know how else to do it.
In response to Super Saiyan X
Why don't you post the saving proc as well and we'll go from there.


EDIT: Also, rereading your proc(I assume its a proc since you did not post that part of the code) you have mob.this and mob.that, but your not telling it which mob its trying to work with. I can't say anything else without seeing more of the context of the code.
In response to Jotdaniel
client
New()
..()
load()

proc
save()
var/savefile/F = new()
F["color"] << mob.color
src.Export(F)
load()
var/client_file = Import()
if(client_file)
var/savefile/F = new(client_file)
if(mob.color)
F["color"] >> mob.color
if(mob.color=="green") mob.color = "#[rand(10,99)][rand(10,99)][rand(10,99)]"
In response to Super Saiyan X
Well if your going to copy the reference you might as well do it right, this appears to be the problem, you have:

 

var/savefile/F = new


and per the example you copied from it should be:

      var/savefile/F = new(client_file)



See the difference?
In response to Jotdaniel
Oops, no.
When I pasted it here I erased something, seems a bit extra got taken off.
In response to Super Saiyan X
So are you trying to say you already have what I posted in your code, and it is still not working? Or that you haven't tried it yet.
In response to Jotdaniel
Well, I haven't gotten the error in a while.
I dunno.
Maybe it's magic!
The only time I've gotten this error is when trying to use client-side savefiles with a world with no world/hub value. Since client-side savefiles rely on that value to determine location.