Help - Search - Members - Calendar
Full Version: Using Callfile In A Script
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM WIP Beta forum
Kthulu
has anyone recently written a script that calls another script? does it work?
let's say scriptA.xas calls scriptB.xas. scriptB runs fine on it's own, but locks up when called from scriptA.

for a specific example, i'm calling my fileOpen.xas script from scriptA. fileOpen.xas runs fine until A is pressed, then it locks the box up. calling fileOpen.xas straight from the menu, it runs without locking up.

fileOpen.xas is listed in the Actionscript Collection thread. Of course, i have commented the old INPUT stuff and uncommented the IQWaitMsg stuff.

scriptA.xas looks like this:
CODE

:START
callfile $ActualPath$\scripts\fileOpen.xas
quit
flattspott
What MXM version?

Cause with the WIP I have a test.xas that I use as a quick loader for any new scripts I'm working on.
CODE

// CallFile $ActualPath$\Scripts\Script1.xas
CallFile $ActualPath$\Scripts\Script2.xas


I just add new lines and comment out the old ones.

Try removing the "Quit" part. I have never used that in any of my scripts.

koldfuzion
yes, im getting lockups too when using callfile.

i changed the skinvalidator to look for an invalid name for mxm.xml to force a jump to the newuser script using callfile and it locked, but the newuser script runs fine from the menu.

last couple lines in the skinvalidator is:
QUOTE

;---------- USER IS AFU.. RUN NEW USER SCRIPT----------
:NEWUSER
Callfile c:\mxmscripts\datefix.xas


there isnt anything after the callfile, and as you see, i made it call another script that i know works flawlessly....and it is still locking up smile.gif

BenJeremy
Well, I will TRY and get a new WIP out tonight.

PRobably no outward changes, as I'm working on incorporating the PnP functionality, and it's one of those things that won't actually be available until the whole thing is done. huh.gif
koldfuzion
thats cool, we are just chatterring amoungs ourselves, so we know if something needs to be added to the buglist.

Better to have a few people see if they get the same results before screeming bug! bug! bug!. smile.gif the WIP msgbox one was a good example of that. Three (or more) getting the same thing is better reporting than one person making thier own mistake and causeing you to waste your time.
Kthulu
@flattspot - wip 1202

thanks for checking my sanity on that KF smile.gif
flattspott
Well like I said I am using 1202 as well. The CallFile's seem to work for my Test.xas. I'll give Tetris a go in a minute though.
Kthulu
@flattspott
QUOTE
Well like I said I am using 1202 as well.

i must be having trouble reading again. i don't see where you said that before. smile.gif

@KF
just curious...the scripts that you are calling with callfile (the ones that work fine on their own, but lock-up with callfile)...do they do any SEARCHing? i'm just trying to figure out what's different with ours and flattspott's...
koldfuzion
no, no searching. file location checking but thats it.

i used the skin validator, instead of it checking for mxm.xml at the start, i changed to mxmrules.xml (no existant)

since the file isnt found, it callfiles the newuser script at the very bottom, nothing at all after it.

the newuser script works fine by itself, as does the skin validator, as long as you dont use the callfile.

im going to make a simple script to test with though, just to make sure its nothing in the other two scripts.
flattspott
QUOTE (Kthulu @ May 12 2004, 06:32 PM)
@flattspott

i must be having trouble reading again. i don't see where you said that before. smile.gif

@KF
just curious...the scripts that you are calling with callfile (the ones that work fine on their own, but lock-up with callfile)...do they do any SEARCHing? i'm just trying to figure out what's different with ours and flattspott's...

Okay so I didn't say that in this topic. You got me there. I know I said something along those lines in another topic though, ie the one about the MsgBox bug.
flattspott
Just tried tetris with 1205 build it worked with it's CallFile
Kthulu
yeah, the old copy of tetris i have worked with 1202 as well. i'm really starting to feel stupid. i fired up the debug server to try and figure out what's going on, but it's not receiving anything from my box...
QUOTE
Initialized
Listening for incoming connections on port 7500

that's all it ever says. i'm using 1205 now, so i'm not over-riding the autoexec. i fire up debugserver, launch mxm, wait for the WIP message to go away, but that's all the debugserver ever says. is there something else i need to do these days?

NOTE1: i tried my callfile scripts out with wip 1172 and it worked fine. still couldn't get anything out of debugserver tho, so i'm sure there's something i'm doing wrong there. do i need to issue any SITE commands?

NOTE2:
callfile scriptB.xas
this is what scriptB.xas is doing when i press A (which is where it crashes when using callfile, but runs fine straight from menu)...
CODE
:SELECTED
;###############################################################################

SET selectNum %pos%
ADD selectNum %top%
XMLGetValue dirList selectName !.%selectNum%
setfunc fnLength LENGTH %curDir%
if %fnLength%%selectName% == "3.." goto BEGININITIALIZATION
if %selectName% != ".." goto STAYCURRENT
set temp %curDir%
sub fnLength 1
setfunc curDir LEFT %fnLength% %curDir%
setfunc curDir FNPATH %curDir%
setfunc hasDot RIGHT 1 %curDir%
if %hasDot% == "\\" goto SKIP1
set curDir "%curDir%\\"
:SKIP1
if %curDir% != %temp% goto PROCEEDNORMALLY
setfunc curDir LEFT 3 %curDir%
:PROCEEDNORMALLY
goto SEARCHBEGIN
:STAYCURRENT
setfunc isDir RIGHT 1 %selectName%
if %isDir% != ">" goto EXIT
setfunc fnLength LENGTH %selectName%
sub fnLength 2
setfunc selectName MID 1 %fnLength% %selectName%
set curDir "%curDir%%selectName%\\"
GOTO SEARCHBEGIN

anybody see any old/bad syntax there?...like with the xml stuff?
BenJeremy
Well, I use STL collections all over the place, and that seems to be the root of my problems here - I get corrupted lists or something.

I just got a crash after finishing a Lights Out level - the system attempted to destroy an image object thinking it was a sound object - not good. I'm trying to reorgnize the code to be clearer, and hopefully avoid any strange interactions with the C++ compiler and the STL constructs.
BenJeremy
Hmmmm... I just cleaned up the DeleteHandles routine, which uses an iterator to go through all open handles and close them at the end of a script.

This might have been causing the trouble, though the code looks fine. I jsut never trust those STL iterators, though, so I only call them once, to cast the relavent pointer to what I need. Seems to have cleaned things up, but I've got to play around with it a bit.
flattspott
QUOTE
anybody see any old/bad syntax there?...like with the xml stuff?

Looks good to me.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.