Working with Venapp

Use this forum to post Vensim related questions.
Post Reply
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Working with Venapp

Post by almoon »

Hi,

I am building a game using Venapp but I have some problem hope u can help:

1- LISTVAR,"FINAL TIME",88,24,7,4,L|System|10|B|255-0-0,[0|60]10|20|30|40|50|60,,

I still got error that the listvar is empty so what is the problem?


2-MODVAR,"Number of new students",17,12,6,5,L,[0|5000|2000],"

still give me error

but the Idea for both error that when I test screen it works perfectly but when I run Venapp it give me error??

so I need some help....
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

I've tried it and it works for me.

Do you have a model loaded before you try these commands?
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Yes I have and as i said when I test screen its work so what do u think the problem?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Final time, by default, is a constant. I suspect that Number of students may also be a constant. Once you execute MENU>GAME you can only change Game variables. So you will need to split the setup part of the Venapp from the ongoing gaming changes. A standard approach is

game input = GAME(constant input)

change constant input before entering game mode, then change game input.
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Is that what u mean ?



:SCREEN NAMERUN
SCREENFONT,Times New Roman|10||0-0-0|-1--1--1
COMMAND,"",0,0,0,0,,,SIMULATE>RUNNAME|?Name for new game output
COMMAND,"",0,0,0,0,,,GAME>GAMEINTERVAL|0.25
COMMAND,"",0,0,0,0,,,MENU>GAME|O
CLOSESCREEN,"",0,0,0,0,,,,GAMEINI
!
:SCREEN GAMEINI
SCREENFONT,Times New Roman|10||0-0-0|-1--1--1
TEXTONLY," G A M E C O N T R O L S",61,2,33,8,C|Times New Roman|16||125-50-75,,,
BUTTON,"Start",62,12,7,5,L,Ss,,MAINGAME
RECTANGLE,"",71,12,7,5,L|Times New Roman|10||75-125-55,,,
TEXTONLY," End ",72,13,5,0,C|System|10|B|75-125-55,,,
BUTTON," Exit ",85,12,9,6,L,Xx,,ASKEXIT1
TEXTONLY,"Set Final Time",79,25,8,0,L|Times New Roman|10|B|255-0-0,,,
LISTVAR,"FINAL TIME",88,24,7,4,L|System|10|B|255-0-0,[0|60]10|20|30|40|50|60,,
TEXTONLY,"Current Time",63,24,8,0,L|Times New Roman|10|B|0-0-0,,,
SHOWVAR,"TIME",72,24,4,0,L|System|10|B|255-0-0,,,
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Once you execute MENU>GAME you can only change Gaming Variables, not Constants.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

... but you can always change the type of your constants to GAME variables in the equation editor, as needed.
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Thanks Tom , but from where can I change it , I checked in the equation editor but I could not find where?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

You can just type in GAME.

Eg if you had a constant before called "INITIAL STAFF" = 0 change it to "INITIAL STAFF" = GAME(0).
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

... or in the equation editor, set the variable type to "auxiliary" and the subtype to "gaming".
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Thanks I mange to change it, but the error is still here :( so what ales might be wrong ?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Do you want to email it to me direct (tony@vensim.com) and I'll take a look?
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Many thanks Tony, I solve it, but I might send it to you to have a quick look and give me your opinion ;)

on the other hand I still 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 ?
Post Reply