Sorry for the weird filenames, but as you can see I have folders structed with various .xas files. Those 3 .xas files are basically what I'm using, just varied in small ways (either different drives or locations). The commands I use are the same...
It would be great is someone experienced in MXM scripting could look at this and possibly find out where I've gone wrong...
Thanks in advance.
DJB <
Thats what I was thinking. <
I apologise, I was hoping that a problem might have been obvious...
Basically what happens is when the menu goes to use / load an actionscript, it always says that the actionscript has failed.
Is there any idea why at all? <
Hey DJB,
I couldn't say off hand... I will glance at your code in a few minutes to see. But the more info you can provide the better. i.e. what is the exact message you receive when it "fails"... now as far as you writing an autoinstaller... I wrote one for mxm myself... there are some things you should be aware of/keep in mind... I would be happy to talk to you more about it... just private message me...
Regards,
SDG
<
A couple of suggestions for debugging. When I was writing my scripts for n6, one of the things I did was, if a problem exists in a script, it will not give you any real useful information about what line it failed on or anything, if it is in a xas file.
Try putting the code into an internally defined script and run it. That may point you in the direction.
Also, It could be one or more of the sub scripts. Trying running them all and see if all of them fail or if some of them work. If some work what things are different between them and the ones that don't.
Remark out most of the script until there is very little left to run then run it and unremark little by little until you find which lines made it fail.
Also some tips for scripts... you may find it better to reduce the number of scripts and use variables to help determine the desired action. For example, instead of having 5 format xas files named, formatc.xas, formate.xas, formatf.xas, formatg.xas, just have one xas file named format.xas that looks at the first argument for the drive letter. Then you could call one file with 5 different arguments such as, format.xas c, format.xas e, format.xas f, format.xas g. This is more efficient and it also makes you 5 times less likely to have a bug in one format command that is not in the others...
Anyway, just food for thought... I didn't see anything obvious wrong with your scripts, but I didn't look too close... try my suggestions. If you still cant figure it out post some additional info such as the results of the afforementioned troubleshooting tests...
Regards,
SDG
<
Thanks for your information on that.
What I might do is try and use lesser actionscripts and use the arguments (good idea actually).
One last question, what would be the best way to embed actionscripts, in the menu.xml file? I think I've read somewhere you can also put them in your mxm.xml file, or does this go more in line with putting the menu in mxm.xml aswell?
I appreciate your help, it's gotta be only a few small problems here (more than likely just placement of actionscripts etc), because looking at the scripting I'm doing I can't see any obvious mistakes either.
Cheers!!
DJB <
sure thing man...
As far as the embedded scripts... that was exactly what I meant. When you embed an actionscript into the menu.xml and then launch it, if it was broken, it will still fail, but it will give you more information about the failure and makes a HUGE difference in debugging... You can embed them by using the following:
Then when you want to use that script, instead of using the CallFile function, use the CallScript function with the name of the function you want to use.
Hope that helps,
SDG
Edit: Sorry, just noticed that you said in the Menu.xml. this would actually go in the mxm.xml and not in the menu.xml. I believe that both the Menu.xml and the MXM.xml can contain menu information. However, as I understand it only the MXM.xml can contain the Config tags which is where the Scripts need to go.
This post has been edited by SumDumGuy3: Oct 11 2004, 03:38 AM <

I'll let you know how I go after I redo it all with your recommendations.