Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel / var / text #217027
07/20/08 23:44
07/20/08 23:44
Joined: May 2008
Posts: 27
x10d3 Offline OP
Newbie
x10d3  Offline OP
Newbie

Joined: May 2008
Posts: 27
Not sure why I can't get this to work. I think by what I have seen and read this should work.

var myVar;

if (this is true)
{
myVar = "This Is True";
}
else
{
myVar = "This Is False";
}

panel MyPanel
{
bmap = PanelImg;
flags = VISIBLE | OVERLAY;
digits(100,100,"%s",arial_font,0,myVar);
}

Last edited by x10d3; 07/20/08 23:44.
Re: Panel / var / text [Re: x10d3] #217031
07/21/08 00:26
07/21/08 00:26
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
var myVar;

should be

STRING* myVar;

and

myVar = "This Is True";

should be

str_cpy(myVar,"This is true");


strings and vars are not totaly same.

Last edited by Quadraxas; 07/21/08 00:27.

3333333333
Re: Panel / var / text [Re: Quad] #217039
07/21/08 00:43
07/21/08 00:43
Joined: May 2008
Posts: 27
x10d3 Offline OP
Newbie
x10d3  Offline OP
Newbie

Joined: May 2008
Posts: 27
I get in ingame popup that says

invalid arguments in MyAction: str_cpy(myVar,@4)

Re: Panel / var / text [Re: x10d3] #217044
07/21/08 01:46
07/21/08 01:46
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
try STRING* myVar = " ";

make sure you use " 's

str_cpy(myVar,"This is true");


3333333333
Re: Panel / var / text [Re: Quad] #217046
07/21/08 02:00
07/21/08 02:00
Joined: May 2008
Posts: 27
x10d3 Offline OP
Newbie
x10d3  Offline OP
Newbie

Joined: May 2008
Posts: 27
I got it working.. I have another quick Question. I am trying to figure the compass direction.. I have figured out that my.pan will go up or down.. But it will keep going after 360 and 0.... So it only half way works. for me is there an easy way to reset my.pan once it reaches 360 or 0 something like:

if(my.pan == 361){
my.pan = 0;
}

if(my.pan == -1){
my.pan = 360;
}

Re: Panel / var / text [Re: x10d3] #217048
07/21/08 02:30
07/21/08 02:30
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
my.pan = my.pan%360;


3333333333

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1