In response to Neimo
Neimo wrote:
You are only saving your x, y, z, password and username; nothing else.

> var/savefile/savefile = new( "directory/[src.key].sav" )
>

Do not use <small>[usr]</small> in procs.

Also, I suggest not manually calling Read() and Write().


If I remove Read(F) and Write(F) i'll get vriable defined but not used, so that's why they're there

And I changed the directory to "players/[src.UserName] so I know they're username instead of there key :D but i still don't think it's working yet i'm about to test in a minute

and that is all I want to save is x,y,z pass and user as of now since I don't have many other things coded in that I'd like to save yet I think O_O
In response to Chaorace
Read the whole post, hopefully you'll see why you won't get the error you just said.

Also, just because something works doesn't mean it is the correct way of doing it.
In response to Neimo
Yeah, I wasn't thinking. I should've explained my overlays comment a bit more. I don't directly save the icons. I save some vars that judge it. For example:
mob{
var{
hair="hair_name&RRGGBB"
}
}


Well, that is how I would handle saving hair that is colorized. Then I load overlays when they are needed to be loaded.
In response to Neimo
Neimo wrote:
Read the whole post, hopefully you'll see why you won't get the error you just said.

Also, just because something works doesn't mean it is the correct way of doing it.

I read the last post you said and don't use usr in procs, I didn't see a usr in my sav/load procs o_O. and if I remove Write(F) i still get an error, but if I remove Read(F) from load i don't get an error for load O_O. I'm so confused. And it still isn't saving anything wtf .___.

mob/verb
Create(mob.client)
var/U =winget(usr,"Login.Username", "Text")
var/P =winget(usr,"Login.Password", "Text")
usr.UserName = P
usr.Password = U
winshow(src, "Login.CreatingCharacter", 1)
sleep(20)
winshow(src, "Login.CreatingCharacter", 0)
if(fexists("players/[usr.key].sav"))
var/savefile/F=new("players/[usr.key].sav")
Save(F)


Maybe it's that verb, and that calls the Save proc or else nothing will save anyways.

mob/proc/Load(var/savefile/F)
F=new("players/[src.key].sav")



mob/proc/Save(mob/M)
var/savefile/F = new("players/[M.key].sav")
Write(F)




mob
Write(var/savefile/F)
..()
F["UserName"]<<src.UserName
F["Password"]<<src.Password
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
F["UserName"]>>src.UserName
F["Password"]>>src.Password
loc = locate(F["x"], F["y"], F["z"])
In response to Chaorace
You're saving a savefile.
In response to Neimo
Neimo wrote:
You're saving a savefile.

where do you see that at. o_O In the create verb?
So I tested and changed it to this and still no difference ._. I wanna get this workin before i go to bed and it's 4:30 AM. Not to be rude or anything I know it's all my fault because I'm not that smart,but can we be a little more specific here when you say, you're saving a save file, or this doesn't belong there, etc. as in, can you show me where im saving a save file and where does it belong, etc.
mob/verb
Create(mob.client)
var/U =winget(usr,"Login.Username", "Text")
var/P =winget(usr,"Login.Password", "Text")
usr.UserName = P
usr.Password = U
winshow(src, "Login.CreatingCharacter", 1)
sleep(20)
winshow(src, "Login.CreatingCharacter", 0)
Save()
In response to Chaorace
Chaorace wrote:
Neimo wrote:
You're saving a savefile.

where do you see that at. o_O In the create verb?

Look at the argument you are passing through Write(). The question to yourself should be - is this what I want?

In addition, may I ask why there's a password system in place when you can simply authenticate the key? If someone does not encrypt my password, I would be cautious or even avoid that game... and I believe you can be liable for being sued unless you put a legal disclaimer/TOS stating that the password will not be encrypted.

So, once again, may I ask why exactly you need a password system in place?

So I tested and changed it to this and still no difference ._. I wanna get this workin before i go to bed and it's 4:30 AM.

Not to be rude but do go to sleep. If you are very tired, not much will penetrate through your head and something simple can be easily overlooked (I know from experience). The forum is not an chat room so it takes time for replies.
In response to Chaorace
Your argument you are using for Save() is mob/M. You need to call Save(src) if you want it to work correctly.
Page: 1 2