Sign in to follow this  
_Engine_

shared keyword

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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] Edited by _Engine_

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this