Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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