ID:146123
 
Code:
Save_Char()
var/savefile/S = new ("Player/[src.mob.ckey]")
S["mob"] << src.mob
S["x"] << src.mob.x
S["y"] << src.mob.y
S["z"] << src.mob.z

obj
tittle
icon = 'tittle.png'

conu
icon = 'conu.PNG'
Click()
src.Load_Char()


Problem description:its saying my proc is a undefined proc but as u see i defined and i checked my spelling and tried client instead of src buti get the same error


Try using usr.Proc()

In Click(), and Dblclick() usr refers to who does the clicking, src refers to what is clicked.
We can't tell if Load_Char() is defined, because you posted Save_Char() above, not Load_Char(). However, likely N1ghtW1ng is right that all you need is usr.Load_Char() in Click().

Lummox JR
In response to Lummox JR
oh srry didnt notice i posted the wrong one
client
proc
Load_Char()
var/savefile/S = new ("Player/[src.mob.ckey]")
S["mob"] >> src.mob
S["x"] >> src.mob.x
S["y"] >> src.mob.y
S["z"] >> src.mob.z
Save_Char()
var/savefile/S = new ("Player/[src.mob.ckey]")
S["mob"] << src.mob
S["x"] << src.mob.x
S["y"] << src.mob.y
S["z"] << src.mob.z

there,this is my first saveing system so i need all the help i can get
In response to SummonerHater
Well, loading directly to x,y,z won't do you any good. You need to load to local vars, then use locate().

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Well, loading directly to x,y,z won't do you any good. You need to load to local vars, then use locate().

Lummox JR

Aside from that, and the need to use usr in the click mob, does using usr in Click() access the client or mob, or both?
I beleive it's just the mob, so to be safe, you sohuld use

usr.client.Load_Char()

(I hope I spelled the proc name right, didn't really pay attention to the name of it.)
In response to CaptFalcon33035
CaptFalcon33035 wrote:
Aside from that, and the need to use usr in the click mob, does using usr in Click() access the client or mob, or both?
I beleive it's just the mob, so to be safe, you sohuld use

usr.client.Load_Char()

(I hope I spelled the proc name right, didn't really pay attention to the name of it.)

Since he defined Load_Char() under /mob, clearly usr.client.Load_Char() is totally wrong.

And usr is always a mob, not the client.

Lummox JR
In response to Lummox JR
No, he defined Load_Mob under client. So, it's not way off, and the object calls the proc, which is why I was questioning "usr".

> client
> proc
> Load_Char()
> var/savefile/S = new ("Player/[src.mob.ckey]")
> S["mob"] >> src.mob
> S["x"] >> src.mob.x
> S["y"] >> src.mob.y
> S["z"] >> src.mob.z
> Save_Char()
> var/savefile/S = new ("Player/[src.mob.ckey]")
> S["mob"] << src.mob
> S["x"] << src.mob.x
> S["y"] << src.mob.y
> S["z"] << src.mob.z
>
In response to CaptFalcon33035
CaptFalcon33035 wrote:
No, he defined Load_Mob under client. So, it's not way off, and the object calls the proc, which is why I was questioning "usr".

Ah, you're correct then. I'd misread his post and thought those were mob procs. In that case, either usr.client.Load_Char() will do, or, since it's the player's own client.Topic(), just Load_Char() is enough.

Lummox JR
In response to CaptFalcon33035
Thank you so much it works now