Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Dumb question about handles #208662
05/28/08 17:49
05/28/08 17:49
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline OP
Serious User
JetpackMonkey  Offline OP
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Hey! I'm stumped, can someone answer why:

var funbananas;

you.whatever = handle(smellyThing);
funbananas = handle(you);
vec_diff(temp.x,camera.x,funbananas.x);

Returns an error that "x is not a member of function" (whatever that is supposed to mean). BUT if I replace funbananas.x with you.x, it works. It seems like Lite-C doesn't like my using the funbananas handle as .x directly

Any ideas what's going on or what I am doing wrong?

Dyuhhhh thanks :P

Re: Dumb question about handles [Re: JetpackMonkey] #208665
05/28/08 17:56
05/28/08 17:56
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Handles are just ID's of the objects -and- vars are no ENTITY pointers (see the ENTITY struct definition in atypes.h). you is an entity struct.

If you want to retrieve the you pointer again from the handle, you can do

ENTITY* superfunkygirl;
superfunkygirl = (ENTITY*)ptr_for_handle(funbananas);

vec_diff(...., superfunkygirl->x);


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