Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - raychaser

Pages: 1 [2]
16
Technical forum / Re: self defined global function
« on: June 17, 2007, 12:57:14 PM »
Hi Mnemonic,

I did exactly what you said above and I put the line

Code: [Select]
global Dlg = new Object("scripts\dialogs.script");
in my game.script file (but I also tried the game_daemon.script file)

the dialogs.script file contains the following:
Code: [Select]
method Dialogue1()
{
Game.Msg("booya");
}


now when I try to run the code "Dlg.Dialogue1();" from scenes\german\scr\window.script I get:  Error@line 12: Method is called for 'Dlg' which is not defined in the log file. I should mention that it works if I run "Dlg.Dialogue1();" from inside the game.script file.

Have I missed something? Why is my global variable not global?

Pages: 1 [2]

Page created in 0.03 seconds with 19 queries.