ID:269671
 
I am creating this game where I want to save some varibles which tell me who owns the land but for some reason it isnt working. Here is the code:

mob/var
Farm1
Farm2
Farm3
Farm4
Farm5
Farm6
Farm7
Farm8
var
Farm1
Farm2
Farm3
Farm4
Farm5
Farm6
Farm7
Farm8
mob
proc
logout()
Farm1 = global.Farm1
Farm2 = global.Farm2
Farm3 = global.Farm3
Farm4 = global.Farm4
Farm5 = global.Farm5
Farm6 = global.Farm6
Farm7 = global.Farm7
Farm8 = global.Farm8
login()
global.Farm1 = Farm1
global.Farm2 = Farm2
global.Farm3 = Farm3
global.Farm4 = Farm4
global.Farm5 = Farm5
global.Farm6 = Farm6
global.Farm7 = Farm7
global.Farm8 = Farm8
mob
Login()
..()
global.peopleworld += 1
if(global.peopleworld == 1)
global.host = usr
var/savefile/F = new(ckey)
Read(F)
if(global.host == 1)
login()
Logout()
if(global.host == 1)
logout()
global.peopleworld -= 1
var/savefile/F = new(ckey)
Write(F)

Could someone please help me.

This belongs in Code Problems, but besides that, I think I know what Lummox would say here: "Why don't you use a list?" You could just create two lists of farms, a global list and a personal list, then copy the global list to the personal list when needed.