ID:264836
 
Code:client/proc/SaveMob()
world << "[src] has logged out of the world."
var/savefile/F = new("players.sav")
var/char_ckeyEX = cKeyeEX(src.mob.name)
F["/[ckeyEX]/[char_ckeyEX]"] << src.mob
ppl -= 1
del(src.mob)



Problem description:

The Code keeps giving me this error: Login.dm:8:error: cKeyeEX: undefined proc
Login.dm:9:error: ckeyEX: undefined var


Can anyone help me?

</<>
You need to use ckeyEx(Text), you cannot have a capital x.

client/proc/SaveMob()
var/savefile/f = new("Saves/[copytext(ckey,1,2)]/[ckey].sav") /* Saves is a folder
[copytext(ckey,1,2)] gets the first letter of the ckey(so its sorted alphabetically)
[ckey].sav saves as clients key full key name without any spaces or special characters. (i use multi slots in one file so its all i need) */

f << src.mob

i removed the other stuff because im assuming this proc will be used often and it destroys the mob

if you really want to use ckeyEx instead of ckey go for it. the only difference is special characters. e.g.

Key: Midget Buster
if using ckey it would come out. Midgetbuster
if using ckeyEx it would come out. Midget Buster
on the save logs.