"agmark" wrote:
ok, I added this:Int(lp) = content.lprice
to deal with the type mismatch of my initial value, but I'm also getting a type mismatch on this line that I'm not sure about:if d < 10 then d = "0" + d
Is it the type of "10" that's mismatched?
The code looks like:
Int(lp) = content.lprice
v = Int((lp + .005) * 100)
units = int(v/100)
decimal = v mod 100
d = decimal.ToStr()
if d < 10 then d = "0" + d
formatted = units.ToStr() + "." + d
print formatted
The line immediately above the one that has the mismatch error sets the type of d to String. Since you still have the numerical decimal variable, try
if decimal < 10 then d = "0" + d
/edit Mark beat me to it
🙂
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com