Jump to content


Photo

Using Callfile In A Script


  • Please log in to reply
14 replies to this topic

#1 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 12 May 2004 - 02:30 AM

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


#2 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 May 2004 - 03:34 AM

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.



#3 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 12 May 2004 - 03:46 AM

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


Edited by koldfuzion, 12 May 2004 - 03:54 AM.


#4 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 12 May 2004 - 10:10 AM

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

#5 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 12 May 2004 - 10:37 AM

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.

#6 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 12 May 2004 - 08:50 PM

@flattspot - wip 1202

thanks for checking my sanity on that KF smile.gif


#7 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 May 2004 - 10:06 PM

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.

#8 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 13 May 2004 - 01:32 AM

@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...


#9 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 13 May 2004 - 01:41 AM

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.

#10 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 13 May 2004 - 03:29 AM

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.

#11 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 13 May 2004 - 03:44 AM

Just tried tetris with 1205 build it worked with it's CallFile

#12 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 13 May 2004 - 09:33 PM

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?

Edited by Kthulu, 13 May 2004 - 09:52 PM.


#13 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 13 May 2004 - 10:34 PM

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.

#14 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 13 May 2004 - 10:41 PM

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.

#15 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 14 May 2004 - 02:31 AM

QUOTE
anybody see any old/bad syntax there?...like with the xml stuff?

Looks good to me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users