ID:263431
 
Code:
client
script = "<STYLE>BODY {background:BLACK; font: 10pt 'arial', bold, italic; margin-left: 0.0in; margin-right: 0.0in} </STYLE>"
mob/new_char/Login()
usr.loc=locate(7,7,2)



turf/New
Click()
usr.loc=locate(65,7,2)

turf/Load
Click()
usr.client.Load_Mob()

turf/delete
Click()
usr.client.DeleteChar()
turf/Trainer
density=1
Click()
usr.cansave=1
switch(input("Are you sure you would like to be A trainer?", "Trainer") in list ("Yes","No"))
if("Yes")
usr<<"Your Journey with a Pokemon Trainer Started!!"
usr.Uchiha=1
usr.Realplayer = 1
usr.human = 1
usr.rassa = "Trainer"
usr.trainer = 1
usr.icon='Base white.dmi'
usr.baseselected=1
usr.veridian = 1
usr.pokemon= 0
usr.cansave=1
usr.client.Save_Mob()
var/obj/Pokeball/B = new/obj/Pokeball
B.loc = usr
usr.leafS=1
usr.loc=locate(95,5,1)
usr.client.Save_Mob()
world<<"<font color=white>[usr] has joined!"
if("No")
return
turf/Pokemon
density=1
Click()
usr.client.chosepkm()




mob/proc/Auto_Save() // autosave
src.client.Save_Mob() //calls save proc
spawn(600) // waits 1 minute
spawn() src.Auto_Save() // calls autosave proc again
mob
Write(savefile/F) // Write proc
..()
F["last_x"] << x // saves your x location on the map
F["last_y"] << y // saves your y location on the map
F["last_z"] << z // saves your z location on the map
F["attacks"] << attacks
Read(savefile/F)
..()
var/last_x // var defined
var/last_y
var/last_z
var/attacks
F["attacks"] >> attacks
F["last_x"] >> last_x // reads your x location on the map
F["last_y"] >> last_y // reads your y location on the map
F["last_z"] >> last_z // reads your z position on the map
src.loc = locate(last_x, last_y, last_z) // locates you to your last map location

client
proc
chosepkm()
usr.cansave=1
switch(input("Wich Type Of Pokemon You wish to be??", "Pokemon") in list ("Fire","Water","Grass","Flyer","Bug","Normal","Eletric","Rock","Cancel"))
if("Fire")
var/random = rand(1,5)
if(random == 1)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='charmander.dmi'
verbs+=typesof(/mob/charmanderAttacks/verb)

if(random == 2)
usr<<"<font color=white>You are now a Cyndaquil!"
usr.Clan = "Fire"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral cynd"
verbs+=typesof(/mob/cyndaquil/verb)

if(random == 3)
usr<<"<font color=white>you are now a Charmander!"
usr.Clan = "Fire"
usr.icon='Pokemons.dmi'
usr.icon_state="evil charm"
verbs+=typesof(/mob/charmanderAttacks/verb)

if(random == 4)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='Pokemons.dmi'
usr.icon_state="evil charm"
verbs+=typesof(/mob/charmanderAttacks/verb)

if(random == 5)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='Pokemons.dmi'
usr.icon_state="hero charm"
verbs+=typesof(/mob/charmanderAttacks5/verb)

if("Fighting")
var/random = rand(1,5)
if(random == 1)
usr<<"<font color=white>You are now a Charabone!"
usr.Clan = "Fighting"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral char"
verbs+=typesof(/mob/charaboneAttacks/verb)


if(random == 2)
usr<<"<font color=white>You are now a Sandshrew!"
usr.Clan = "Fighting"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral sand"
verbs+=typesof(/mob/shandshrewhero/verb)



if(random == 3)
usr<<"<font color=white>You are now a Charabone!"
usr.Clan = "Fighting"
usr.icon='Pokemons.dmi'
verbs+=typesof(/mob/charaboneAttacks3/verb)

if(random == 4)
usr<<"<font color=white>You are now a Sandshrew!"
usr.Clan = "Fighting"
usr.icon='pokemons.dmi'
usr.icon_state="hero sand"
verbs+=typesof(/mob/shandshrewhero/verb)

if(random == 5)
usr<<"<font color=white>You are now a Charabone!"
usr.icon='Pokemons.dmi'
usr.icon_state="evil char"
verbs+=typesof(/mob/charaboneAttacks3/verb)

if("Ice")
var/random = rand(1,2)
if(random == 1)
usr.Clan = "Ice"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral arti"
verbs+=typesof(/mob/articunoAttacks3/verb)
usr<<"<font color=white>You are now an Articuno!"
if(random == 2)
usr.Clan = "Ice"
usr.icon='Pokemons.dmi'
usr.icon_state="evil arti"
verbs+=typesof(/mob/articunoAttacks/verb)

if("Flyer")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Gastly!"
usr.Clan = "Flyer"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral gas"



if(random == 2)
usr<<"<font color=white>You are now an Pidgey!"
usr.Clan = "Flyer"
usr.icon='Pokemons.dmi'
verbs+=typesof(/mob/gey/verb)

if(random == 3)
usr<<"<font color=white>You are now an Spearow!"
usr.Clan = "Flyer"
usr.icon='Pokemons.dmi'
usr.icon_state="neautral spear"
verbs+=typesof(/mob/spear/verb)

if("Water")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Krabby!"
usr.Clan = "Water"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral krab"
verbs+=typesof(/mob/krabby/verb)

if(random == 2)
usr<<"<font color=white>You are now an Squirtle!"
usr.Clan = "Water"
usr.icon='Pokemons.dmi'
usr.icon_state="neutral sq"
verbs+=typesof(/mob/squirtle/verb)

if("Eletric")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Pikachu!"
usr.Clan = "Electric"
usr.icon='Pikachu.dmi'
verbs+=typesof(/mob/pikachu/verb)

if(random == 2)
usr<<"<font color=white>You are now a Pikachu!"
usr.Clan = "Electric"
usr.icon='Pikachu.dmi'
verbs+=typesof(/mob/pikachu/verb)

if("Grass")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Bulbasaur!"
usr.Clan = "Grass"
usr.icon='Pokemons.dmi'
usr.icon_state="neautral bulba"
verbs+=typesof(/mob/bulba/verb)

if(random == 2)
usr<<"<font color=white>You are now a ekans!"
usr.Clan = "Grass"
usr.icon='Pokemons.dmi'
usr.icon_state="neautral eka"
verbs+=typesof(/mob/ek/verb)

if("Bug")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Caterpie!"
usr.Clan = "Bug"
usr.icon='Pokemons.dmi'
usr.icon_state="Neautral cater"
verbs+=typesof(/mob/weed/verb)


if(random == 2)
usr<<"<font color=white>You are now a weedle!"
usr.Clan = "Bug"
usr.icon='Pokemons.dmi'
usr.icon_state="neautral weed"
verbs+=typesof(/mob/wed/verb)

if("Normal")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Ratata!"
usr.Clan = "Normal"
usr.icon='Pokemons.dmi'
usr.icon_state="Neautral rata"
verbs+=typesof(/mob/rata/verb)


if(random == 2)
usr<<"<font color=white>You are now a Eevee!"
usr.Clan = "Bug"
usr.icon='Pokemons.dmi'
usr.icon_state="neautral eevee"
verbs+=typesof(/mob/eve/verb)
if("Cancel")
return












Save_Mob() // the save proc
if(usr.cansave)
usr<<"<font color=white>Saved!"
usr.SaveK()
spawn(3000) Save_Mob()
else
usr << "<font color=white>For some reason you cannot save at this time!"
Load_Mob() // load proc
if(fexists("players/[usr.ckey]/[usr.ckey].sav")) // checks if there is a file...
var/savefile/F = new("players/[usr.ckey]/[usr.ckey](1).sav") // if there is, it makes up the file var...
usr.Read(F) // reads the old location
sleep(1)
world << "[src] has logged in!!!!" // tells world you logged in
if(usr.icon_state == "evil charm")
usr.verbs+=typesof(/mob/charmanderAttacks/verb)
if(usr.icon_state == "evil char")
usr.verbs+=typesof(/mob/charaboneAttacks3/verb)
if(usr.icon_state=="evil arti")
usr.verbs+=typesof(/mob/articunoAttacks/verb)
if(usr.icon_state=="hero charm")
usr.verbs+=typesof(/mob/charmanderAttacks5/verb)
if(usr.icon_state=="hero sand")
usr.verbs+=typesof(/mob/shandshrewhero/verb)
if(usr.icon_state=="neutral charm")
usr.verbs+=typesof(/mob/charmanderAttacks/verb)
if(usr.icon_state=="neutral char")
usr.verbs+=typesof(/mob/charaboneAttacks/verb)
if(usr.icon_state=="neutral arti")
usr.verbs+=typesof(/mob/articunoAttacks3/verb)
if(usr.icon_state=="neutral gas")
usr.verbs+=typesof(/mob/gastly/verb)
if(usr.icon_state=="neutral krab")
usr.verbs+=typesof(/mob/krabby/verb)
if(usr.icon_state=="neutral sq")
usr.verbs+=typesof(/mob/squirtle/verb)
if(usr.icon_state=="neutral pik")
usr.verbs+=typesof(/mob/pikachu/verb)
if(usr.icon_state=="neutral sand")
usr.verbs+=typesof(/mob/sandshrew/verb)
if(usr.icon_state=="neutral cynd")
usr.verbs+=typesof(/mob/cyndaquil/verb)
if(usr.icon_state=="neautral bulba")
usr.verbs+=typesof(/mob/bulba/verb)
if(usr.icon_state=="Neautral cater")
usr.verbs+=typesof(/mob/weed/verb)
if(usr.icon_state=="neautral weed")
usr.verbs+=typesof(/mob/wed/verb)
if(usr.icon_state=="Neautral pidgey")
usr.verbs+=typesof(/mob/gey/verb)
if(usr.icon_state=="Neautral rata")
usr.verbs+=typesof(/mob/rata/verb)
if(usr.icon_state=="neautral spear")
usr.verbs+=typesof(/mob/spear/verb)
if(usr.icon_state=="neautral eka")
usr.verbs+=typesof(/mob/ek/verb)
if(usr.icon_state=="neautral eevee")
usr.verbs+=typesof(/mob/eve/verb)
usr.Auto_Save() // starts the auto save loop
else
src << "<font color=white>You do not have a save on this server!"
DeleteChar()
if(fexists("players/[usr.ckey]/[usr.ckey].sav"))
var/sure=alert(src,"Are you sure you want to delete your character?","Confirmation","Yes","No")
if(sure=="Yes")
sleep(0)
fdel("players/[usr.ckey]/[usr.ckey].sav")
src << "Character Deleted"
else
src << "Canceled deleting 'players/[usr.ckey]/[usr.ckey].sav'"
else
src << "<font color=white>You do not have a character saved on this server."


Problem description:
when I compile it says no errors but then when I run it says "BYOND(353.912) ERROR: maximum number of lists exceeded (65535)!" I think it might be an open tag somewere or a loop I also when I tried to enter(this is a pokemon game) I got the first screen and It worked fine(has new game, load, delete) then after I clicked new game It worked to go to the correct location, but when I tried to click trainer or pokemon nothing happened. idk if there is a problem with the turf or somthing... just take a look and plz tell me if you have any ideas to help. you can post here or contact me thru IM at swift_falcon240@hotmail.com


There are two problems here:

  • No put usr in proc. Ungh.

  • The code you posted doesn't cause the problem.

    Exceeding the list limit nearly always comes from assigning a list to things like turfs, and initializing them for every single one. This can happen for other things too, but if this is occurring right away, it has to do with how you defined your turfs.

    Lummox JR
In response to Lummox JR (#1)
ok I still dunno how to fix this XD
In response to Swift_falcon240 (#2)
To fix, stop giving your turfs loads of lists.
In response to Lummox JR (#1)
Lummox JR wrote:
There are two problems here:

  • No put usr in proc. Ungh.
  • The code you posted doesn't cause the problem.

    You forgot one...

  • That code is SO DAMNN FUUGLY!!! *faints*