Page 1 of 1

Working with Venapp

Posted: Wed Oct 27, 2010 10:08 pm
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....

Posted: Thu Oct 28, 2010 7:38 am
by Administrator
I've tried it and it works for me.

Do you have a model loaded before you try these commands?

Posted: Thu Oct 28, 2010 9:07 am
by almoon
Yes I have and as i said when I test screen its work so what do u think the problem?

Posted: Thu Oct 28, 2010 10:14 am
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.

Posted: Thu Oct 28, 2010 11:22 am
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,,,

Posted: Fri Oct 29, 2010 10:01 am
by bob@vensim.com
Once you execute MENU>GAME you can only change Gaming Variables, not Constants.

Posted: Mon Nov 01, 2010 1:57 pm
by tomfid
... but you can always change the type of your constants to GAME variables in the equation editor, as needed.

Posted: Tue Nov 02, 2010 10:26 am
by almoon
Thanks Tom , but from where can I change it , I checked in the equation editor but I could not find where?

Posted: Tue Nov 02, 2010 1:51 pm
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).

Posted: Tue Nov 02, 2010 2:09 pm
by tomfid
... or in the equation editor, set the variable type to "auxiliary" and the subtype to "gaming".

Posted: Tue Nov 02, 2010 2:36 pm
by almoon
Thanks I mange to change it, but the error is still here :( so what ales might be wrong ?

Posted: Tue Nov 02, 2010 4:05 pm
by Administrator
Do you want to email it to me direct (tony@vensim.com) and I'll take a look?

Posted: Fri Nov 05, 2010 11:21 am
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 ?