Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help with a digits specifier #274881
06/29/09 00:43
06/29/09 00:43
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline OP
Member
paracharlie  Offline OP
Member
P

Joined: Mar 2009
Posts: 146
USA
I have used every specifier that I know of to display the Variable 15 in the digits line. Can someone help me with the digits line and show me how to display 15. I have tried the integer specifiers but the only specifier that works after % is %f. I'm about to pull my hair out. because I want a integer to show not a float.


Code:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////

var STR = 15;


PANEL* stats = {	
	digits(300, 250, "STR: %  ", *, 1, STR);	
	flags = SHOW;
}


////////////////////////////////////////////////////////////////////

function main()
{
	video_mode = 7; 
	screen_color.blue = 150;
}




A8 Commercial
Re: Need help with a digits specifier [Re: paracharlie] #274883
06/29/09 00:47
06/29/09 00:47
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
http://www.conitec.net/beta/apanel-digits.htm

example show how to show an int... if you are pulling your hair out always means that you skip some place on manual wink

%.0f


3333333333
Re: Need help with a digits specifier [Re: paracharlie] #274884
06/29/09 00:52
06/29/09 00:52
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Code:
...
   digits(300, 250, "STR: %.0f  ", *, 1, STR);   //numeric integer		eg " 5"
   digits(300, 250, "STR: %.3f  ", *, 1, STR);  //numeric to 3 decimals		eg " 5.123"
   digits(300, 250, "STR: %7.3f  ", *, 1, STR); //7 digit numeric to 3 decimals	eg "_ 5.123"
   ...




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Need help with a digits specifier [Re: EvilSOB] #274888
06/29/09 01:11
06/29/09 01:11
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline OP
Member
paracharlie  Offline OP
Member
P

Joined: Mar 2009
Posts: 146
USA
I knew it was something easy. Thanks guys. I forgot about placement. %.0f... Well good thing is that I'll never forget hehe.


A8 Commercial

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