Latest
Operating System:
Windows XP
Web Browser:
Exploer
Game/Hub(s): hub://
Detailed Problem Description:
when ever i open dream seeker in my game after i put in the house system it says this BYOND(341.877) ERROR: maximum number of lists exceeded (65535)! if i diaable thecode it works if i dont it says that
Code Snippet to Reproduce Problem (enclose in DM tags):
obj
var
saveX = 0
saveY = 0
saveZ = 0
turf
var
saveX = 0
saveY = 0
saveZ = 0
list
owner = list()
doormatt
Enter(mob/M)
if(src.owner.len == 0)
switch(alert(M,"Do you wish to buy this house?","Buying House","Yes","No"))
if("Yes")
M<<"Welcome to your new house"
src.owner.Add(M.key)
return 1
if("No")
return 0
else
if(M.key in src.owner)
return 1
else
M<<"This isn't your house!!!"
return 0
var/list/HouseStuff = list()
world/New()
if(fexists("House.sav"))
var/savefile/F = new("House.sav")
F >> HouseStuff
for(var/obj/O in HouseStuff)
if(istype(O,/obj))
O.loc = locate(O.saveX,O.saveY,O.saveZ)
for(var/turf/T in HouseStuff)
if(istype(T,/turf/doormatt))
for(var/turf/S in world)
if(istype(S,/turf/doormatt))
if(S.loc == locate(T.saveX,T.saveY,T.saveZ))
S.owner = T.owner
HouseStuff.Remove(T)
world/Del()
var/savefile/F
F = new("House.sav")
for(var/turf/T in world)
if(istype(T,/turf/doormatt))
T.saveX = T.x
T.saveY = T.y
T.saveZ = T.z
HouseStuff.Add(T)
if(istype(T,/turf/tiles/housefloor))
for(var/obj/O in T)
O.saveX = O.x
O.saveY = O.y
O.saveZ = O.z
HouseStuff.Add(O)
F << HouseStuff
Does the problem occur:
Every time? Or how often?
everytime
In other games?
no
On other computers?
yes
In other user accounts?
yes
You've created a list, owner, and defined it for every single turf. First of all, there's no way you'd need such a list to be initialized for every single turf; in most cases it could be null. Secondly, for most cases where you're concerned about ownership, a turf is not the place to store that information because it's not as if that changes so much on a turf-by-turf basis as by assigned plots. The turf should be part of something else, an area being the easiest choice, that stores that information.
Lummox JR