Gamestudio Links
Zorro Links
Newest Posts
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Quad, ozgur, Nymphodora), 7,674 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 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 | 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