Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,499 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
fixed(var float) ? #224895
09/01/08 20:35
09/01/08 20:35
Joined: Oct 2005
Posts: 57
P
picoder Offline OP
Junior Member
picoder  Offline OP
Junior Member
P

Joined: Oct 2005
Posts: 57
Hello,

In C-script, I can use this function: a = fixed(floatv(x));
and result is x = a
But there isn't fixed() function anymore in lite-c.

For example,
mtl.skill1=floatv(x);
How can I find x value again from mtl.skill1 in lite-c?


Thanks in advance.


Last edited by picoder; 09/01/08 20:39.
Re: fixed(var float) ? [Re: picoder] #224954
09/02/08 07:23
09/02/08 07:23
Joined: Oct 2005
Posts: 57
P
picoder Offline OP
Junior Member
picoder  Offline OP
Junior Member
P

Joined: Oct 2005
Posts: 57
var my_var;
...
my_metarial.skill5 = floatv(500);
...
my_var = my_metarial.skill5; // my_var is 1113728.000
my_var = (var)(my_metarial.skill5); // my_var is 1113728.000
my_var = _VAR(my_metarial.skill5); // my_var is -393216.000

What should I do for my_var is 500? Any idea?

Many thanks in advance.

Re: fixed(var float) ? [Re: picoder] #225003
09/02/08 14:56
09/02/08 14:56
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
skill 5 is of type var but contains a float, so the first thing I'd try is

my_var = *(float*)&(my_material.skill5);


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