Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 742 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 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,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°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 | 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