Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by mistery. 09/22/26 09:40
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
What are you working on?
by rayp. 09/16/26 20:20
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (mistery, VoroneTZ, LoT, Petra, 1 invisible), 1,446 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
lopezsergio07, mistery, lokkalyansamiti, rahulbuilds, speedx
19237 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,133
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,133
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