shared keyword

Started by
7 comments, last by _Engine_ 11 years, 9 months ago
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?
Advertisement
Can you post the problematic code file?
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]
Where is Label defined (in the last function)? I don't see anything immediately wrong with your code.
Hi!
If I remove all expect declaration of class Foo I still got error.
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.

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

HI!

Looks like this is a problem. I wiil try last version :)
:)

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

HI!

sorry i was using old version but now all is fine :)

This topic is closed to new replies.

Advertisement