Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Simple pen_setvar question #207838
05/22/08 15:30
05/22/08 15:30
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Hey guys

got a simple question to the pan_setvar command.


PANEL* item_amount =
{
pos_x = 0;
pos_y = 0;
layer = 4;

digits(624, 202, 3, tahoma2, 1, potion_owned);

}

function testing_items()
{
if(potion_owned > 0)
{
(item01.pstring)[0] = potion;
item01.flags = VISIBLE;
pan_setvar(item_amount, 1, 1, potion_owned);
item_anzahl.flags = VISIBLE;
}
else
{
item01.flags = NULL;
pan_setvar(item_amount, 1, 1, here's my problem.);
}

}

what do I have to type in there, when i want it to show Nothing. no matter what I type in there, the engine shows me at least "0". but I want it to show nothing in that case. so how do I solve that?

because I don't want to blank out the panel. cause i want to define all digits I need for that. I don't want to make a panel for every empty space I need.


greets Roxas

Last edited by Roxas; 05/22/08 15:32.
Re: Simple pen_setvar question [Re: Roxas] #207842
05/22/08 15:55
05/22/08 15:55
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
you could use digits(0,0,"%s",*,1,stringa);

so you use a string then asing a var

str_cat_num (stringa,"%.0f",potion_owned);

else{str_cat_num(stringa,"%.0f","");

only thing is you need to update the str_cat_num every frame
hope it helps you


"empty"

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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