Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Renaming skills with the #define keyword #208453
05/27/08 14:46
05/27/08 14:46
Joined: Nov 2007
Posts: 18
J
JimmyJazz Offline OP
Newbie
JimmyJazz  Offline OP
Newbie
J

Joined: Nov 2007
Posts: 18
I have a script that controls a player - in this script I can define meaningful names with the #define keyword and allocate values to them - no problem, this works fine. However, in a second script (for combat) any references to the meaningful name result in a "not a member of 'ENTITY'" compiler error. If I use the skill name (skill1, skill2, etcetera) it works fine and the values are correctly referenced it's just when I use the assigned label.

Funny thing is I've used a similar principle in another script (passing an ENTITY reference across scripts and referencing values using labels) and there are no problems.

Anyone else encountered this? If so, what was the work around?

Thanks in advance...

Cheers - Jim.

Last edited by JimmyJazz; 05/27/08 14:47.
Re: Renaming skills with the #define keyword [Re: JimmyJazz] #208456
05/27/08 15:05
05/27/08 15:05
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
The error means that the compiler has not yet encountered the #define when you try to use it. So make sure the #define comes before the place where you use it. Take a look at the order in which you #include files.

Re: Renaming skills with the #define keyword [Re: Excessus] #208459
05/27/08 15:16
05/27/08 15:16
Joined: Nov 2007
Posts: 18
J
JimmyJazz Offline OP
Newbie
JimmyJazz  Offline OP
Newbie
J

Joined: Nov 2007
Posts: 18
D'oh! That's solved it!

I've been pulling my hair out for two days over that - I suppose it's one of those solutions you just can't see for looking too hard!

Cheers, matey - much appreciated!

Thanks - Jim.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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