Page 1 of 1
Empty LISTVAR
Posted: Sun Nov 07, 2010 8:39 pm
by almoon
I have a problem with the listvar it keeps give me that the listvar is empty so what is going on ?
do I need to change anything in my model to make it work ?
Posted: Sun Nov 07, 2010 11:55 pm
by Administrator
Can you post anything here that demonstrates the error?
Posted: Mon Nov 08, 2010 11:42 am
by bob@vensim.com
The message occurs when the variable referred to is not a constant (or a gaming variable in game mode)
Posted: Mon Nov 08, 2010 2:27 pm
by almoon
LISTVAR,"FINAL TIME",88,24,7,4,L|System|10|B|255-0-0,[0|60]10|20|30|40|50|60
so this is what I wrote, so what do you think the problem?
Posted: Mon Nov 08, 2010 3:12 pm
by Administrator
Are you running a game while trying to access the listbox?
Posted: Mon Nov 08, 2010 3:15 pm
by almoon
Yes.
Posted: Mon Nov 08, 2010 5:50 pm
by Administrator
That's the reason. FINAL TIME is a constant, you cannot modify it during a game (you can only change it before the game starts).
Posted: Mon Nov 08, 2010 6:58 pm
by almoon
mmmm and am not sure how to do that...
Posted: Mon Nov 08, 2010 7:48 pm
by Administrator
Have a screen where you set constants (like final time etc). Then move to a new screen when you start the run where you can change the gaming decisions.
Posted: Tue Nov 09, 2010 11:55 am
by almoon
Thanks, I did that but the problem is still available ,,,
but I was thinking is the final time is the same one in the model when we put the setting of the model?
maybe from there the problem ?
Posted: Wed Nov 10, 2010 10:45 am
by bob@vensim.com
You need to look at the equation for FINAL TIME. Normally this is a constant, but many models, especially project models, make this a variable. If it is not a constant you won't be able to change it. I would not recommend making FINAL TIME a game variable.
A more useful question might be why you would want to change FINAL TIME anyway? If the user is tired of the game they can just stop playing.