Page 1 of 1

Illegal function definition when i try to declare a function

PostPosted: Mon Sep 16, 2013 11:25 pm
by SkenderBeu
Hi,

This is a function that i took from a tutorial, but if i try to save the script it says:

Error line 2: Illegal function definition in ex10006149964313
Error line 6: Expected ;

Code: Select all
void MyFunction1(int variable1)
    {
     CreateActor("Arrow", "Test_Arrow", "(none)", "(none)", 0, 0, false);
     Arrow.angle = direction(Archer_A.x, Archer_A.y, collide.x, collide.y);
    }


What am I doing wrong

Thanks

Re: Illegal function definition when i try to declare a func

PostPosted: Mon Sep 16, 2013 11:27 pm
by MInefan
That looks right...

Re: Illegal function definition when i try to declare a func

PostPosted: Mon Sep 16, 2013 11:28 pm
by MInefan
look it up

Re: Illegal function definition when i try to declare a func

PostPosted: Mon Sep 16, 2013 11:37 pm
by SkenderBeu
MInefan wrote:look it up


Thank you for the quick answer.

In global code that function works but not in actor scripts :(