GameMonkey Script

GameMonkey Script Forums
It is currently Wed Jan 23, 2019 1:51 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 13, 2004 11:42 am 
Offline

Joined: Fri Oct 08, 2004 2:18 pm
Posts: 9
Hi,

Just so everyone knows, the code below will not work...

Code:
func1 = function()
{   
   Alert("func1");
};

func2 = function()
{
   Alert ("func2");
   func1();
};

func2();
Alert("Win");


Alert is a native function that pops up a message box. After running the above code you will get a message box with func2, but none with func1. You need to change the code to...

Code:
global func1 = function()
{   
   Alert("func1");
};

func2 = function()
{
   Alert ("func2");
   func1();
};

func2();
Alert("Win");


I found this a little strange in the beginning.

- Sid


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group