ID:269112
 
BYOND Version: 341.877

Operating System: windows xp

In my game digimon wild i cant use edit for some stats, when i brought out the new version there was about 50 new vars in it and now the bottom few vars in edit are missing is there a way i can make it able to edit them again?
Don't know if this happens on other computers, games although it does happen every time.
This would be in fact a code problem, if I'm not mistaken.
Input() only displays a certain amount of things within the input box. The limit is either 100 or 150, anything after that becomes trancated.

proc
big_list_input(var/list/L,Title="Title" , Message="Message", person=src)
var/choice="Previous"
var/position=0
var/list/current=null
while(choice=="Next"||choice=="Previous")
switch(choice)
if("Next")
if(position+98<L.len)
position+=98
if("Previous")
if(position>98)
position-=98
current=L.Copy(position,min(position+98,L.len))
current+="Next"
current+="Previous"
choice=input(person,Message,Title) as null|anything in current
return choice


To use it, rather than var/item=input("What do you want") in free_item_list you would do var/item=big_list_input(free_item_list)

Sample verb:
mob
verb
test_big_lists()
set category="Test"
var/list/P=new
var/C=0
while(C<200)
P+=C
C++
var/D=big_list_input(P,"Vars","Choose a variable",usr)
usr<<"Your choice from the test big list was [D]"
my cpu is an xp too. So maybe on the "edit" code in digimon(if you have the codes) you can include your vars.
In response to Kaiome
CPU doesn't stand for computer. It stands for Central Processing Unit. Your CPU and your OS have nothing to do with each other.
In response to Nick231
im not sure where to put that i just use
var/variable = input("Which var?","Var") in O.vars

normally it would probably be easier if its possible to ignore any vars starting with dv as these are the ones that started the problem and theres several hundred of them now which im unlikely to want to edit, am i able to exclude them?
In response to Kaiome
erm my problem is that the code isnt doing that...
In response to Ter13
the OS probably has nothing to do with the problem either :P
In response to AZA
yeh seems to have been moved to developer how-to instead tho...
In response to Dragon-wars
Well you could exclude them, but from personal experience the second you are no longer able to do something is the time you will need to be able to do it...

To get rid of them you would just have to loop through O.vars and add them to a temporary list if they do not contain "dv".

To use big_list_input() you would use

var/variable=big_list_input(O.vars,"Var","Which var?")


(Note the extra arguments, I changed the proc in an earlier post to allow for customizing the title/message of the input box, aswell as directly the input to someone other than the person who used the verb that called it.)
In response to Nick231
hmm i get a runtime error for this line
        var/typeof = O.vars[variable]


oh and the runtime is that it is a bad index

im not able to change the variable to variable=big_list_input or to just big_list_input because its says the big list isnt a defined var and when the = is there it says missing expression too...
In response to Dragon-wars
That is because big_list_input isn't a variable, it's a proc that returns a value, and thus you must call it as a proc.

See here.
In response to Nick231
hmm now it skips the bit that chooses the var and goes strait to the next box and give me an error for this line
current=L.Copy(position,min(position+98,L.len))
In response to Nick231
thats just a link back to his post...
In response to Dragon-wars
Dragon-wars wrote:
hmm now it skips the bit that chooses the var and goes strait to the next box and give me an error for this line
current=L.Copy(position,min(position+98,L.len))


What is the error that it's giving?
In response to Sheepywoolyfluff
Sheepywoolyfluff wrote:
thats just a link back to his post...

Yes, it is. I had already given an example of how to use it and rather than post it again I linked to the original (which as it would just happen was the post he replied to).