Hi!
So i tryed to declare shared class but it leads to error ( ERR: expected identifier) when compiling script. When I remove keyword shared then script compiled successfully. Maybe i must triger some flag to enable this feature?
shared keyword
Hi!
code is very simple
[source lang="cpp"]
shared class Foo
{
void MethodInFoo(int b) { bar = b; }
int bar;
};
shared class TestClass
{
float dt;
GUILabel @item;
};
void Caller(float dt)
{
TestClass test;
test.dt = dt;
@test.item = @Label;
}[/source]
code is very simple
[source lang="cpp"]
shared class Foo
{
void MethodInFoo(int b) { bar = b; }
int bar;
};
shared class TestClass
{
float dt;
GUILabel @item;
};
void Caller(float dt)
{
TestClass test;
test.dt = dt;
@test.item = @Label;
}[/source]
Where is Label defined (in the last function)? I don't see anything immediately wrong with your code.
What version of AngelScript are you using?
The only reason I can think of that can cause this problem is if you're using an older version that doesn't have support for the shared classes. The shared feature was introduced in version 2.22.0.
The only reason I can think of that can cause this problem is if you're using an older version that doesn't have support for the shared classes. The shared feature was introduced in version 2.22.0.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
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
Popular Topics
Advertisement