ID:264721
 
Code:
mob/Login()
usr.loc = locate(8,9,1)
src<<sound("Death Note - Death Note Theme.wma")
..()


Problem description:
that is only part of my login code but i think that is all you need???? but when i log in the music doesnt play i have file and it still wont play plzz if u can help do so it will be greatly apreciated.

Double quotes will not work when a file is required, you need single quotes instead.
thnx so much i have been trying to get that to work for a while now i thought i had single quotes on it tho but thnx a lot it works now. u are very helpful^^
In response to Uchiha Legacy
umm also i was wondering if you could help me on my save and load coding it doesnt work like it wont even sya your file game has been saved? think u could help


my coding is here

mob/var/list
V
mob
proc
AutoSave()
if(src.cansave)
src.SaveK()

spawn(600)
src.AutoSave()
mob
proc
SaveK()
if(src.cansave)
var/savefile/F = new("players/[src.key].sav")
src.V = src.verbs
src.xco = src.x
src.yco = src.y
src.zco = src.z
Write(F)
src << "<font color=red><b>Your game has been saved!"


mob
verb
Savenow()
set name ="Save"
if(usr.cansave)
var/savefile/F = new("players/[usr.key].sav")
usr.V = usr.verbs
usr.xco = usr.x
usr.yco = usr.y
usr.zco = usr.z
Write(F)
spawn(10) usr << "<font color=red><b>Your game has been saved!"
mob
proc
LoadPlayer()
if(fexists("players/[src.key].sav"))
var/savefile/F = new("players/[src.key].sav")
Read(F)
for(var/stuff in src.V)
src.verbs += stuff
world<<"<font size=1><font color=red><B>Info: <font color=white>[src]([src.key]) has logged in..."
src.loc = locate(xco,yco,zco)
client.view=6
src.cansave=1
src.AutoSave()



atom/movable/var
xco = 0
yco = 0
zco = 0
cansave = 0

In response to Uchiha Legacy
In response to Garthor
well i used that code and it says usr.Load() is an undefined proc
In response to Uchiha Legacy
That would be because usr is a mob, but Load() belongs to clients.
In response to Garthor
ok u have the code but how do i make it so when i click load on the login screen it loads from there instead of just going straight to the file bcz that is what it is doing now it just is skipping my login screen
In response to Uchiha Legacy
You would remove it from client new, and put it whereever you want it to load.
In response to Pirion
how would i do that
In response to Uchiha Legacy
This is what i have now
client
proc
Save()
var/savefile/F = new("players/[ckey].sav")
F["mob"] << mob
Load()
if(fexists("[ckey].sav"))
var/savefile/F = new("players/[ckey].sav")
F["mob"] >> mob

New()
Load()
..()
Del()
Save()
..()

mob
Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
loc = locate(F["x"], F["y"], F["z"])




and then i have the Load turf for my login screen
turf/Load
density = 1
layer = 999
Click()
usr.Load
In response to Uchiha Legacy
Uchiha Legacy wrote:
> turf/Load
> density = 1
> layer = 999
> Click()
> usr.Load
>


You need to indent the line after Click, also Load() is a procedure not a variable you need to put parenthesis after it.

turf/load
Click()
var/client/c = usr
c.Load()
In response to tidus123
That is nearly correct except for the fact that usr != client. usr refers to the client's mob, so you need to refer to the mob's client in order for that snippet to be correct.