Author Topic: integer to single?  (Read 1075 times)

0 Members and 2 Guests are viewing this topic.

Offline zop

  • Major
  • *
  • Posts: 81
integer to single?
« on: September 02, 2008, 03:29:15 am »
Is there any possible to transform integer to single? Or single to integer?

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: integer to single?
« Reply #1 on: September 02, 2008, 03:45:42 am »
I dont think so, but what for? Single holds coordinates. Integer holds numbers. So you have a number, and u want to convert it to single? How about you just define a single already?

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: integer to single?
« Reply #2 on: September 02, 2008, 03:47:30 am »
integervariable :=strtoint(floattostr(roundto(singlevariable,0)));
singlevariable := strtofloat(inttostr(integervariable));
« Last Edit: September 02, 2008, 03:49:16 am by zakath »

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline zop

  • Major
  • *
  • Posts: 81
Re: integer to single?
« Reply #3 on: September 02, 2008, 09:26:08 am »
Thanks zakath ! That works ! :D

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: integer to single?
« Reply #4 on: September 02, 2008, 01:49:35 pm »
int := round(flt);

Offline zop

  • Major
  • *
  • Posts: 81
Re: integer to single?
« Reply #5 on: September 03, 2008, 07:14:25 pm »
Thank you iDante :D

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]