Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 748 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Macros in Panel Elements #438025
03/05/14 06:30
03/05/14 06:30
Joined: Jun 2013
Posts: 108
Alberta, Canada
C
CanadianDavid Offline OP
Member
CanadianDavid  Offline OP
Member
C

Joined: Jun 2013
Posts: 108
Alberta, Canada
Any reason why macro definitions don't work in some elements such as a PANEL digits element? The following produces a "Number syntax" error:

Code:
#define A_MACRO_DEFINITION 0

PANEL* HUD = {
	digits(A_MACRO_DEFINITION , A_MACRO_DEFINITION, 0, *, 1, 1);
}


It seems this issue was also noticed by another user in this post.

Re: Macros in Panel Elements [Re: CanadianDavid] #438029
03/05/14 09:16
03/05/14 09:16
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I think it is mentioned in the manual. similarly they don't work in struct definitions too. or is it mentioned only for structs?


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Macros in Panel Elements [Re: sivan] #438034
03/05/14 09:52
03/05/14 09:52
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
From the Manual: http://www.conitec.net/beta/define.htm

Quote:
#defines are valid within all subsequent C code, but ignored in script parts that are not C standard, such as effect code or engine objects definitions like PANEL*, MATERIAL* etc.

Re: Macros in Panel Elements [Re: oliver2s] #438115
03/07/14 13:42
03/07/14 13:42
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Structs are C standard and support macros, buts PANEL definitions don't.


Moderated by  old_bill, Tobias 

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