Simple string question - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Simple string question (/Thread-Simple-string-question) |
Simple string question - bmanny - 05-22-2017 12:19 PM I've searched chapter 10 in the sphere wiki but haven't found an answer. Right now what I get is this. Tag.BonusTactics = 15. This gives 1.5 tactics. Tag.MyTag = Bonus Tactics: <eval <Tag.BonusTactics>> This would output "Bonus Tactics: 15" My question is... how do I insert a " . " in the second to last character so that it outputs: "Bonus Tactics: 1.5" ? RE: Simple string question - Coruja - 05-22-2017 03:56 PM for numbers with 1 digit precision you can use <fval> (eg: <fval 15>=1.5) you can also use <floatval> if you need high precision results with 6 digits (eg: <floatval 123/321>=0.383178) RE: Simple string question - Satvet - 05-29-2017 11:21 PM Coruja, <hval> can you explain? and if there are a few more. I needed the above explanation. thx RE: Simple string question - Coruja - 05-30-2017 01:07 PM <hval> is the same of <eval> but it return the result value in hex instead dec RE: Simple string question - Satvet - 05-30-2017 10:07 PM thx. dude |