🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

class/bug?

Started by
1 comment, last by WitchLord 15 years, 9 months 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)
Advertisement
Your code needs to be in a function. Column 3 is the point at which the compiler realizes something is wrong.
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