Illegal function definition when i try to declare a function

Non-platform specific questions.

Illegal function definition when i try to declare a function

Postby SkenderBeu » Mon Sep 16, 2013 11:25 pm

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
SkenderBeu
 
Posts: 4
Joined: Tue Aug 13, 2013 7:24 pm
Score: 0 Give a positive score

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

Postby MInefan » Mon Sep 16, 2013 11:27 pm

That looks right...
MInefan
 
Posts: 2
Joined: Fri Sep 13, 2013 11:01 pm
Score: 1 Give a positive score

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

Postby MInefan » Mon Sep 16, 2013 11:28 pm

look it up
MInefan
 
Posts: 2
Joined: Fri Sep 13, 2013 11:01 pm
Score: 1 Give a positive score

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

Postby SkenderBeu » Mon Sep 16, 2013 11:37 pm

MInefan wrote:look it up


Thank you for the quick answer.

In global code that function works but not in actor scripts :(
SkenderBeu
 
Posts: 4
Joined: Tue Aug 13, 2013 7:24 pm
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron