Gamestudio Links
Zorro Links
Newest Posts
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (1 invisible), 44,469 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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


Moderated by  old_bill, Tobias 

Gamestudio download | 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