ID:2189106
 
(See the best response by Ter13.)
Good afternoon.

*sorry for my bad english*

Are there any way to check the verbs in a save file before loading it so that you can delete some verbs in the code tree that are not used without affecting the save file?

SO AVOID THIS

runtime error: wrong type of value for list
proc name: cargarp (/mob/proc/cargarp)
source file: 1.3 Login.dm,736
usr: (src)
src: Jeuuchihara (/mob)
src.loc: NaruterosV3 (669,401,2) (/turf/ImagenesLogin/Customization3)
call stack:
Jeuuchihara (/mob): cargarp()
NaruterosV3 (662,400,2) (/turf/inicio/cargar2): Click(NaruterosV3 (662,400,2) (/turf/inicio/cargar2), "windowprinc.map1", "icon-x=17;icon-y=4;left=1;scre...")



This error happens when I remove a verb from the code tree and leaves the save files unusable

mob/proc/
cargarp()
var/i=0
if(src.partida=="Uno") i=1
if(src.partida=="Dos") i=2
if(src.partida=="Tres") i=3
if(i==0||i==null)return
src.cargado=1
if(fexists("players/[src.ckey]/[src.ckey]([i]).sav"))
var/savefile/F = new("players/[src.ckey]/[src.ckey]([i]).sav")
var/LastX
var/LastY
var/LastZ
F["LastX"]>>LastX
F["LastY"]>>LastY
F["LastZ"]>>LastZ
F["dir"]>>src.dir
F["name"]>>src.name
F["icon"]>>src.icon
F["Oicon"]>>src.Oicon
F["icon_state"]>>src.icon_state
F["contents"]>>src.contents
F["overlays"]>>src.overlays
F["celulaas"]>>src.celulaas
var/verbsave
F["Verbs"] >> verbsave
src.verbs += verbsave//THIS IS source file: 1.3 Login.dm,736
src.loc=locate(LastX,LastY,LastZ)


I will read suggestions, thank you very much.
Best response
There are null values in the verbs list. Simply:

while(verbsave.Remove(null))


You really shouldn't be saving verbs, though, which I recall saying probably hundreds of times over the years.
okay thank you for you help.
In response to Ter13
Ter13 wrote:
while(verbsave.Remove(null))


I don't know if it's faster, but it most likely is:

verbsave -= new /list(verbsave.len)
In response to MrStonedOne
MrStonedOne wrote:
Ter13 wrote:
> while(verbsave.Remove(null))
>

I don't know if it's faster, but it most likely is:

> verbsave -= new /list(verbsave.len)
>


Thank you MrStonedOne , its perfect *,*