Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, alibaba), 1,426 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
float problem #404983
07/20/12 12:12
07/20/12 12:12
Joined: Jul 2011
Posts: 69
P
pjotr987 Offline OP
Junior Member
pjotr987  Offline OP
Junior Member
P

Joined: Jul 2011
Posts: 69
hi, i get now following error:
Can't convert CONV:POINTER::FLOAT

actualy i try to receive a float from a DLL, abviously it doesnt work somehow
here is the DLL function

DLLFUNC void* f1(float r[3][3],int l)
{


r[0][0]=0.0555;
r[0][1]=0.0222;
r[0][2]=0.0333;
return r;
}

Lite-C code:
float* matrix[3][3]; ///////matrix
float f1(float* ra, int l);///function initialisation

matrix= f1(matrix,l);//calling the DLL Function and
transferring the data into matrix

somehow i cant get the float values drom DLL to Lite-C.

can pls someone help me out.

thanks in advance

Re: float problem [Re: pjotr987] #405002
07/20/12 18:58
07/20/12 18:58
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
maybe:
float matrix[3][3]; ///////matrix
float f1(float ra, int l);///function initialisation

DLLFUNC void f1(float* r,int l)


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: float problem [Re: sivan] #405003
07/20/12 19:28
07/20/12 19:28
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
return r into a void* you actualy have to cast it
for example

return (float*)r;

but its a better idea to create matrix structure and pass
that on return instead.. that structure you need in dll
and also in litec ....
and also i think litec not okay on floats so
in you have yo convert to var and vice versa (not sure)

Last edited by Wjbender; 07/20/12 19:31.

Compulsive compiler

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