vector array ??

Posted By: dracula

vector array ?? - 07/06/08 08:29

Hi

Some A6.22 code initializes an array with:
var move_vec[3] = 0,0,0;

Later we have:

if(move_vec[0] == 0 && move_vec[1] ==0)
etc, etc

I get syntax errors with Lite C. Can anyone tell me what the problem is please.



Thank you
Posted By: Joey

Re: vector array ?? - 07/06/08 08:59

try

Code:
var move_vec[3] = {0,0,0};

Posted By: croman

Re: vector array ?? - 07/06/08 09:02

or try:

VECTOR move_vec;

Later we have:

if(move_vec.x == 0 && move_vec.y ==0)
etc, etc
Posted By: dracula

Re: vector array ?? - 07/06/08 14:42

Thanks guys !

What I am interested in, is writing a FPS or TPS in just Lite-C code, ie without any templates. The Lite-C workshops are good but they only can show you so much. All the stuff on the web (and there's alot) is all C Script. I know C++ quite well but it can be confusing !

I think it would be excellent if someone could write a simple FPS in pure Lite C. It is much easier to learn from looking at a documented program. I am surprised Conitec haven't done this yet.

There's a challenge for someone. As an added incentive, I will love you.
© 2023 lite-C Forums