Advertisement

shared keyword

Started by July 21, 2012 09:08 PM
7 comments, last by _Engine_ 12 years, 4 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?
Can you post the problematic code file?
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]
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

Advertisement
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