Jump to content
  • Advertisement
Sign in to follow this  
_Engine_

shared keyword

This topic is 2182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!