ID:261988
 
These codes work but they are temporary. How do I make tem permanent?Sorry about how wide it is I could not make it less wide.

area
House1
Enter()
if(owned==1)
if(usr.owner=="House1")
usr<<"Welcome" usr><<"[housename]" return 1
else
if(usr.canenter=="House1") usr><<"[housename]" return 1
else
usr><<"This is not your house,[housename]"
return 0
else
switch(alert("This house is for sale, do you want to buy it for 50000 gold?",,"Yes","No"))
if("Yes")
if(usr.gold>=5000)
usr.gold-=5000
usr.owner="House1"
owned=1
statpanel("House")
usr.verbs+=/mob/proc/invite
usr.verbs+=/mob/proc/un_invite
usr.verbs+=/mob/proc/name_house

else
usr<<"You dont have enough gold!"
if("No")
return 0



mob
proc
invite(mob/M in world)
set category="House" if(M.client==null) src><<"You can't invite non-player characters into houses!"
else
M.canenter=src.owner M><<"You have been invited into [src]'s home"
src><<"you have invited [M] into your home"
name_house()
set category="House" if(src.owner=="House1") for(var/area/House1/H in world)
H.housename=input("What do you want to name your house?")
if(src.owner=="House2") for(var/area/House2/H in world)
H.housename=input("What do you want to name your house?")
if(src.owner=="House3") for(var/area/House3/H in world)
H.housename=input("What do you want to name your house?")
un_invite(mob/M in world)
set category="House" if(M.client==null) src><<"You can't un invite non-player characters into houses!"
else
M.canenter=0 M><<"You have been un invited to [src]'s home"
src><<"you have un invited [M] into your home"><dm>
You need to save things using a savefile to make them permanent. Look up savefiles in the reference and dig in.
Program code is already plural. "Codes" makes no sense. Disabuse yourself of it.

And no put usr in proc. Ungh.

Lummox JR