Gamestudio Links
Zorro Links
Newest Posts
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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Digits Probs :X [Re: Yashas] #412731
12/02/12 05:07
12/02/12 05:07
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

int xx=20;//<-your int value inside structure

var yy;//<-temp var that will be displayed inside panel

PANEL* my_panel =
{
	pos_x = 100;
	pos_y = 50;

	digits(0,0,"%.0f",*,1,yy);//<-- seems to only take a variable 
	 
 	flags = SHOW | OUTLINE;
}

function main()
{
  vec_set(screen_size,vector(800,400,0));
  vec_set(screen_color,vector(50,1,1)); // dark blue
  vec_set(sky_color,vector(50,1,1)); // dark blue
  video_window(NULL,NULL,0,"My New Game");
  d3d_antialias = 1;
  shadow_stencil = 3;
  
  level_load("");
  vec_set(camera.x,vector(-250,0,50));
  vec_set(camera.pan,vector(0,-15,0));

	while(1)
	{
		xx+=1;
 		yy=(int)xx;//<-converted into var just for displaying purpose
 					  //but xx is stil int value 
 		wait(1);
	}

}



Only global var variables or global predefined STRING* pointers
can be displayed (no int, float, char, or other types of variables).
The var can be part of a global struct or of an array, but not of a multidimensional array.


Compulsive compiler
Re: Digits Probs :X [Re: Wjbender] #412732
12/02/12 05:10
12/02/12 05:10
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Thanks FIXED!!
Just changed all the data-types in my struct to vars and it works laugh


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Digits Probs :X [Re: Yashas] #412742
12/02/12 08:30
12/02/12 08:30
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
What about the workaround I posted?
( digits(20, 20, "%.0f",* ,1024, an_integer); )

I just want to know if this is completely wrong and will cause anything to crash.
an integer has the same size as a float / var so there shouldn't be a memory problem confused
and the *1024 compensates the number difference perfectly...


POTATO-MAN saves the day! - Random
Page 2 of 2 1 2

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