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
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
'x' is not a member of 'function' #370099
05/10/11 22:37
05/10/11 22:37
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Hello;
I´m translating a large old .wdl script into Lite-C, and runned into a problem.
I declared a variable vector using "x", but the new syntax doesn´t recognize it, and i didn´t found no reference of such matter anywhere in the manual.

Code:
var Shield_maker[3];

function...
{
 ...
   vec_for_vertex(Shield_maker.x,player_A,1186);
   ent_create(shield1_mdl,Shield_maker.x,PLAYERSHIELD_A);
   PLAYERSHIELD_A.scale_x=0.40;
   PLAYERSHIELD_A.scale_y=0.40;
 ...


It gives the following error:

Error in ´actions.c´ line 588;
´x´: is not a member of ´function´
< vec_for_vertex(excudo_cria.x,jogador_A,1186);
>

The index searches ´vector_for_vertex´, ´x´, ´vector´, ´variables´, etc, in the manual help produces no results towards the matter.
Any help is appreciated, thanks in advance.

Re: 'x' is not a member of 'function' [Re: Ericmor] #370101
05/10/11 22:59
05/10/11 22:59
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
VECTORs are defined like

VECTOR myvector; not var myvector[3];

all this stuff is at c-script to lite-c part of manual.

http://www.conitec.net/beta/litec_migration.htm

Last edited by Quadraxas; 05/10/11 23:00.

3333333333
Re: 'x' is not a member of 'function' [Re: Quad] #370113
05/11/11 03:43
05/11/11 03:43
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
var myvector[3];

now you say
myvector[0];//same as x
myvector[1];//same as y
myvector[2];//same as z


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: 'x' is not a member of 'function' [Re: FoxHound] #370240
05/11/11 19:11
05/11/11 19:11
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Thanks Quadraxas and FoxHound.
I´ll read the litec_migration again, more carefully.
Actually, better save the html link, since this particular page doesn´t show up in most of my searches.

Code:
var myvector[3]={1,2,3};

IS NOW:

VECTOR* myvector={x=1;y=2;z=3;}



Thanks once more!


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