Advertisement

class/bug?

Started by September 13, 2008 06:57 AM
1 comment, last by WitchLord 16 years ago
Hello! AS code:

class MyClass
{
	int a;
}

MyClass v1;
v1.a = v1.a - 3;
I'm getting 'Expected identifier at column 3' for 'v1.a = ...' statement. Am I doing something wrong? (I'm on trunk)
Your code needs to be in a function. Column 3 is the point at which the compiler realizes something is wrong.
Advertisement
Exactly.

The global statements can only be used to declare global variables. You cannot perform general expression statements, as global statements.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement