SuperStrict?

BlitzMax Forums/BlitzMax Beginners Area/SuperStrict?

BachFire(Posted 2007) [#1]
Hello,

I'm trying to use SuperStrict for my code. I'm correcting everything the best I can, as the compiler gives me errors. But I have trouble with the CreateTimer command. It says "Unable to convert 'TTimer' to 'Float'".. Or Int, if I try to use that.. The code:

SuperStrict

'SeedRnd MilliSecs()
'Local degrees#=Rnd(315,405)
Local degrees:Int=194

Local width:Int=800
Local height:Int=600
Local paddley:Int=0
Local opponenty:Int=300

Local ballx#=400
Local bally#=300

Local ballspeed#=9
Local paddlewidth:Int=20
Local paddleheight:Int=100
Local points:Int=0
Local recentcollision_user:Byte=False
Local recentcollision_top:Byte=False
Local recentcollision_bottom:Byte=False
Local timer#=0
timer=CreateTimer(60)


I'm lost.. What do I need to do, do make it accept the timer?

EDIT: Is there somewhere I can read about the rules of SuperStrict? I have tried looking up the command in BB help, but it just says something like "sets SuperStrict mode", which didn't help much.


CS_TBL(Posted 2007) [#2]
timer is a TTimer object, not a Float object. So the correct code would be: timer:TTimer=CreateTimer(60)


btw, ints are faster than bytes. So unless you're working with huge memorybanks of things, you're adviced to use ints, rather than bytes..


BachFire(Posted 2007) [#3]
Thanks a lot! :)


tonyg(Posted 2007) [#4]
Superstrict