Page 1 of 1

Error message in Global Code

PostPosted: Thu Jun 14, 2007 10:09 pm
by laddsa
Hi,

I have a very simple function prototype at the top of the global code editor, i.e

void countshots(int);

and have a funtion definition, i.e

void countshots(int shots)

{

//code will go here

}


If I save the ged file, close Game Editor (v. 1.3.7) then reopen GE, open the ged file and try to run it, then it says theres an error in the global code. When I check the global code I get the following error message:
'Redeclaration of parameter 'countshots'. Is there something that I am doing wrong?

Many thanks

Laddsa

PostPosted: Thu Jun 14, 2007 10:11 pm
by Sgt. Sparky
you cannot declare the same void twice(if you use both). :D
EDIT: or your code is wrong,
can you show me the code? :)

PostPosted: Thu Jun 14, 2007 10:23 pm
by Fuzzy
You dont prototype in C/GE. Just go straight to

void countshots(int shots)

{

//code will go here

}

PostPosted: Thu Jun 14, 2007 10:39 pm
by laddsa
Thanks very much chaps. I shall try it without the function prototype and hopefully it will work!

Kind regards,

Laddsa

PostPosted: Tue Jun 19, 2007 4:31 am
by Sgt. Sparky
how is laddsa a name,
I mean:
is it a split name somthing like Lad Sah? :|