Trisrendered()

Blitz3D Forums/Blitz3D Programming/Trisrendered()

El Neil(Posted 2007) [#1]
i have just got the full version of blitz3d. where has trisrendered() gone? it was on the demo. when i run my demo-created code, it says "unknown function" but everything else works:

Text 0,0,"Polygons Rendering: "+ Str (TrisRendered())

any ideas?

neil


t3K|Mac(Posted 2007) [#2]
Text 0,0,"Polys: "+trisrendered()


big10p(Posted 2007) [#3]
That wont make any difference, t3k. Converting TrisRendered to a string to print it is unnecessary, though.

I have v1.96 and it works fine. Maybe it was broken in the latest version, somehow?! *shrugs*


El Neil(Posted 2007) [#4]
its cool, just downloaded 1.98 and it works now.

thanks,

neil


big10p(Posted 2007) [#5]
Of course. I'd forgotten that when you first buy B3D, you get an ancient version, and have to download the update. ;)


t3K|Mac(Posted 2007) [#6]
i just wanted to point out that its not neccessary to convert to string before printing it on screen via text command.


El Neil(Posted 2007) [#7]
yeah i changed that too - just a bad habit. im so sick of code not working properly because i havent str()'d it so i just do it without thinking.

cheers again

neil


Subirenihil(Posted 2007) [#8]
Actually, Str$() is necessary in certain circumstances. Although most places it is not important, it still is a good idea to use it. It can also makes code a little more readable. :)

Defining Local variables is not necessary either but it's still good practice as most other languages do require it. Also, don't assume that a newly-defined variable is zero, set it yourself. Most languages do not automatically assign a value to new variables. You can see what I mean if you look at the contents of a newly-defined bank.

Not requiring these things is one of the reasons I chose Blitz3D, and it's also nice if I have a little thing I want to do quickly. But for more permanent projects I recommend using convention. Doing so will help if you ever use another language.