Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, degenerate_762, 7th_zorro), 1,075 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | 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