I had to break up my scripts into about 5 components in my last project, one master script and various sub scripts dedicated to specific areas of functionality. I was able to set a variable in one script from a routine in another, prefixing the target script name to the variable name, as you would to call a routine, thus: sub Init Def = 0 PLevel = 0 SLevel = 0 Stopped = 1 Internal.X = 0 Internal.FT = 0 Internal.PTrans = 0 DScript.DStatus = 0 DScript.DFuse = 0 DScript.Seen = 0 SScript.SStatus = 0 Internal.CMode = 0 Grooves.GL = 0 SetMasterGrooveLevel Grooves.GL SetMasterVolume 0 end sub was an initialisation routine in my main script that set the initial values of variables in 4 other scripts. I hope that's helpful, Ciaran -----Original Message----- From: directmusic-bounce@xxxxxxxxxxxxx [mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of Kenneth Young Sent: 25 January 2003 23:37 To: directmusic@xxxxxxxxxxxxx Subject: [directmusic] Script Weirdness II Hey folks, Things have been quiet around here recently; I hope everyone is doing ok?!! My script has been getting rather obese recently, and I found that I had reached a limit on its size. So, I've begun converting my project into multiple scripts (oh joy unbound). I've found that passing a variable to another script, where that variable is then being checked by an if statement, results in this error: <0001> Script error in script.spp, line 244 <0001> Microsoft AudioVBScript Runtime Error: Type Mismatch: the condition of an if statement did not evaluate to a numeric True/False value <0001> Error Code: 0x88781224 My solution to this is to call a subroutine in the destination script which "manually" changes the variable. Whilst this solves the problem, and I have everything working, I was wondering if I was missing something fundamental? Cheers, Kenny