Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/20/26 07:00
Black Book, 4th edition
by jcl. 03/17/26 09:28
Trying to get started...
by Lukudo. 03/16/26 09:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 4,224 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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