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
1 registered members (TipmyPip), 18,586 guests, and 6 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
Not Member of Entity error #364808
03/21/11 03:35
03/21/11 03:35
Joined: Mar 2011
Posts: 11
R
RetroGamer Offline OP
Newbie
RetroGamer  Offline OP
Newbie
R

Joined: Mar 2011
Posts: 11
i used to use GS when A6 was current...
now im trying to switch my code to Lite-C,
im having a slight prob on how to define a movement var..
'move_vec'.
i think it just the way its defined, here it the code and error..

using old engine...
DEFINE move_vec_x,skill98;
DEFINE move_vec_y,skill99;
DEFINE move_vec_z,skill100;

if(!my.falling == my.jumping == 0)
{
my.move_vec_x = (key_force.y) * int(my.Walk_Anm_Speed) * time;
my.move_vec_y = (key_comma - key_period) * int(my.Strafe_Anm_Speed) * time;
}

that seemed to work...

the new code...

VECTOR move_vec;

if(!my.falling == my.jumping == 0)
{
my.move_vec[0] = (key_force.y) * int(my.Walk_Anm_Speed) * time_step;
my.move_vec[1] = (key_comma - key_period) * int(my.Strafe_Anm_Speed) * time_step;
}

minus the syntax changes... i get an error saying
"Error in 'resources\scripts\player.c' line 112: 'move_vec' : is not a member of 'ENTITY' "

i do beleive im just defining wrong. 'move_vec' is only being used inside the player function (should i define it inside the player function?). i would like to use the same variable for x,y and z. should i define as vector... var...
or angle... please help im lost i've been pouring over tut's..
it seems it can be defined many ways... just not sure of best way.

thank you


ever hear the expression once you learn it's hard to forget...
I think learning programming languages as,

I just mastered old school roller skating...
Now they have roller blades, Same wheels, different setup
Re: Not Member of Entity error [Re: RetroGamer] #364811
03/21/11 03:59
03/21/11 03:59
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Please use [/code] tags to show your code on the forum. They're much neater.

Local variables don't use "my.". Also, VECTOR contains x,y,z, not [0],[1],[2]. Just use the DEFINE method like in your C-Script, but turn this:
Code:
DEFINE move_vec_x,skill98;


Into this:
Code:
#define move_vec_x skill98


No commas, no semicolons.

Oh, and since "int" is a variable type in Lite-C, the function is now called "integer".

I hope that's helpful laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Not Member of Entity error [Re: JibbSmart] #364815
03/21/11 07:30
03/21/11 07:30
Joined: Mar 2011
Posts: 11
R
RetroGamer Offline OP
Newbie
RetroGamer  Offline OP
Newbie
R

Joined: Mar 2011
Posts: 11
sorry for the messy post, will use the tag next time.
yes that does help, thank you for your reply


ever hear the expression once you learn it's hard to forget...
I think learning programming languages as,

I just mastered old school roller skating...
Now they have roller blades, Same wheels, different setup

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