Ok here is the code:
//Alright This Code Will Make It So When Someone Logs In It Makes Their "dayson" var go up by on and check on the thirtieth day of the world being up if there character has been on less than 5 days.
// This Includes the save checks and everything and should work although there is no map to test on its just merely to test the code with.
//Please Report All Bugs To Me in an Email at [email protected]
atom/movable
var
dayson=0
var
day=0
green=""
mob
proc
Save_Days()
var/savefile/F= new(ckey)
Write(F)
F["Days"]<< src.dayson
F["Name"]<<src.name
Load_Days()
if(fexists(ckey))
var/savefile/F=new(ckey)
Read(F)
F["Days"]>>src.dayson
F["Name"]>>src.name
mob/proc
Save_WDays()
var/savefile/F = new(world.name)
Write(F)
F["Wdays"]<<day
Load_WDays()
if(fexists(world.name))
var/savefile/F= new(world.name)
Read(F)
F["Wdays"]>>day
mob
Login()
if(fexists(ckey))
usr.Load_Days()
usr.dayson+=1
usr.Save_Days()
else
usr.name=input("Name","Name")
if(day==30)
if(usr.dayson<=5)
usr<<"Your Days On Is Too Low On The Thirtieth Day Please Come Back And Create A New One"
if(fexists(ckey))
var/savefile/F= new(ckey)
del(F)
else
usr<<"Your savefile is still valid"
else
usr<<"Your Savefile Is Still Valid"
mob
verb
Save_Day()
if(day==0)
Load_WDays()
day+=1
Save_WDays()
else
Save_WDays()
Save()
src.Save_Days()
Load_Day()
Load_WDays()
day+=1
mob
verb
Make_Day_30()
day=30
mob
Stat()
statpanel("Demo")
stat("Days On: [usr.dayson]")
stat("Day: [day]")
Everytime I run it, and save, reboot and try to load the save i get an error saying the save is already in use, and
doesnt work.
If anyone can help me with this please tell me.
</<src></<></<day>
ID:147214
Aug 7 2004, 7:00 am
|
|
Aug 7 2004, 8:48 am
|
|
use DM tags
|