declaring functions

Game Editor comments and discussion.

declaring functions

Postby phractus » Thu Mar 25, 2004 7:24 am

I use this:

void Function_Name()
{
whatever
}

in the global code editor, then for the name put in Function_Name.

i try to use
Function_Name();
to use the function but does nothing.

I cant get it to list these functions in the funtion list, or to get em to work for the most part. any ideas? Do i hafta declare them somewhere like at creation of something?
phractus
 
Posts: 77
Joined: Mon Mar 08, 2004 1:25 am
Location: Rochester, NY, USA
Score: 0 Give a positive score

Postby jazz_e_bob » Thu Mar 25, 2004 9:32 am

M's checkers demo uses functions.

Don't forget to name the function and hit the add button in the global code window.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Thu Mar 25, 2004 3:05 pm

To work, some script action must call a global function
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest