A couple of pointers:
"new" is a keyword and is used for creating an instance of a class. You can't assign something to it.
I believe what you're looking for instead of this:
[source lang="csharp"]new = player();[/source]
is something like this:
[source lang="csharp"]Player somePlayer = new Player();[/source]
Additionallty, make sure you end each line with a semicolon.
This bit:
[source lang="csharp"]if darkknight health = 0;[/source]
needs a couple of adjusments. Firstly, you need to use dot syntax for accessing an object's properties. If health is a property of your darkknight object, you access it via "darkknight.health". Secondly, you need to put the if condition inside brackets. Thirdly, don't put a semicolon at the end (it won't break compilation, but the code block following your "if" will never run). What you want is something like this:
[source lang="csharp"]if (darkknight.health == 0)[/source]
This:
[source lang="csharp"]Vec.destroy kyurem();[/source]
From your description I gather that "destroy" is a method of Vec? In which case you need to call it as a method, with "kyurem" as a parameter like so:
[source lang="csharp"]Vec.destroy(kyurem);[/source]
Show differencesHistory of post edits
#1archanian
Posted 12 December 2012 - 09:47 PM
A couple of pointers:
"new" is a keyword and is used for creating an instance of a class. You can't assign something to it.
I believe what you're looking for instead of this:
[source lang="csharp"]new = player();[/source]
is something like this:
[source lang="csharp"]Player somePlayer = new Player();[/source]
Additionallty, make sure you end each line with a semicolon.
This:
[source lang="csharp"]Vec.destroy kyurem();[/source]
From your description I gather that "destroy" is a method of Vec? In which case you need to call it as a method, with "kyurem" as a parameter like so:
[source lang="csharp"]Vec.destroy(kyurem);[/source]
"new" is a keyword and is used for creating an instance of a class. You can't assign something to it.
I believe what you're looking for instead of this:
[source lang="csharp"]new = player();[/source]
is something like this:
[source lang="csharp"]Player somePlayer = new Player();[/source]
Additionallty, make sure you end each line with a semicolon.
This:
[source lang="csharp"]Vec.destroy kyurem();[/source]
From your description I gather that "destroy" is a method of Vec? In which case you need to call it as a method, with "kyurem" as a parameter like so:
[source lang="csharp"]Vec.destroy(kyurem);[/source]