I am trying to obtain a percentage of a number that will end up something like 33.058347563498... How do I convert this to an integer?
This is the code I have tried, but it doesn't work:
SET DISPLAY MODE 1024,768,16
sync on
sync rate 0
scw=screen width()
load image "media/testimage3088x2056.jpg",10,1
imgw=image width(10)
scaleval=int(scw/imgw)*100
sprite 2,x,y,10
scale sprite 2,scaleval
do
cls
sprite 2,0,0,10
print "image x="+str$(imgw)
print "scw="+str$(scw)
print " scale value="+str$(scaleval)
sync
loop
Can someone help me please? I tried using WORD, DWORD, and # but the variable scaleval keeps coming back 0
Thanks for the assistance!
Jason