animation and "Type" code.

BlitzPlus Forums/BlitzPlus Beginners Area/animation and "Type" code.

gerald(Posted 2013) [#1]
I am trying animation by the book. The book uses the code player:TPlayer = new TPlayer and the compiler says the Type must be in the main program and illegal type conversion.

I truncated the code to read player = TPlayer and it runs but I am at a loss to deal with the incorrect code.

The code uses the player.x = 400 code and I removed all the decimals so I have playerx = 400 and it runs. Again, I can't explain the difference.

Is there an example program to follow. The book has chapter 7 program 2 but it is finished so it runs but no code help, demo 07.2.

Is there any code examples for beginner use?

Gerald


Yasha(Posted 2013) [#2]
Judging by the syntax, you're using a book for BlitzMax or a similar BASIC language. Unfortunately BlitzMax code isn't compatible with BlitzPlus code so you should definitely start by finding a different tutorial.

There are several good tutorials about using types to be found in regular forum posts already on this site. A Google custom site search ("site:www.blitzbasic.com etc") may be the best way to index them all. There's also a great advanced tutorial at <here> to give a look to once you understand the basics.

While BlitzPlus isn't compatible with BlitzMax, it is compatible with Blitz3D - you can use the B3D tutorials, of which there are many more. There are a couple on the very first page of the B3D Tutorials forum index.


THE KiLlEr 484(Posted 2014) [#3]
it tells me missile not found even though i have typed "type missle" before and it worked... help please


GfK(Posted 2014) [#4]
it tells me missile not found even though i have typed "type missle" before and it worked... help please
I'm afraid you're going to have to be a little more verbose in explaining your problem. Especially as what you've said so far seems to have nothing to do with the thread that you've posted the question in.

If you require help then please provide a sample of your non-working code, otherwise it's extremely unlikely that anyone will be able to help.