Jump to content


Photo

Actionscript Issues


  • Please log in to reply
2 replies to this topic

#1 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 01 December 2003 - 02:17 PM

BJ,

These are the issues I had with actionscripts. Some I am sure you are aware of, and perhaps have already fixed, but I thought I would put together a list:

1. Errors in called scripts are not reported, instead the line that called the script is said to be in error.

2. Scripts stop on a lot of errors it shouldn't. MKDir should NOT halt the script if the dir is already there. Perhaps each script action should set a global variable that can be check to see if the action succeded (Like the DOS ErrorLevel).

3. You can't set " in a variable directly. The only way I could was to read that character from a file.

4. Using "If %Somevar% < 1" doesn't work if embedded in menu.xml or mxm.xml, but does work if in a XAS file. > also fails as these are reserved characters in XML. I tried using $gt$, $lt$, &gt, &lt. None of these worked.

5. When using the XML commands to write an XML file, if you write a line that contains ", "&quote;" is put in the file in it's place. The script will not work like this.

6. As we worked out, to use Context Items you must have 3 dummy items in MXM.xml.

7. When using Context Items, it does not appear that _GameDesc is being filled correctly, it was always blank for me.

8. Not sure if this is how it is expected to work, but when I used the XML commands to build a new XML, I created the "base" node, added a node named "BIOS" to it, and set an element named name within the BIOS node. I then saved the count (which returned 0 instead of one!) and added a new BIOS node. When done the count was STILL 0, and I could only read data from the first BIOS node (But I could read that node as both !.BIOS.Name and !.BIOS:0.Name!)

9. Delete doesn't take wildcards, and doesn't have the option to recurse.

10. RMDir doesn't delete a dir if it has stuff in it.

11. WriteFile and WriteFileLN both seem to do the same thing. Both put a CR/LF at the end of the line.

Think thats about it off the top of my head, as I think of more I will add them.

Morden.

Edited by Mordenkainen, 01 December 2003 - 02:24 PM.


#2 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 01 December 2003 - 03:37 PM

QUOTE
10. RMDir doesn't delete a dir if it has stuff in it.


The only way i have seen that it wont remove a dir is if there is a subdirectory that is empy. Which i have told BJ about.

QUOTE
8. Not sure if this is how it is expected to work, but when I used the XML commands to build a new XML, I created the "base" node, added a node named "BIOS" to it, and set an element named name within the BIOS node. I then saved the count (which returned 0 instead of one!) and added a new BIOS node. When done the count was STILL 0, and I could only read data from the first BIOS node (But I could read that node as both !.BIOS.Name and !.BIOS:0.Name!)


Not sure if i read this right, but it sounds like you are trying to get the count of the node when making the xml, in which case, it hasnt saved yet...so they dont exist yet....so you will get zero. Unless I read that wrong...if I read it right, then you need to set a var in your script and increase the value on each loop.


QUOTE
3. You can't set " in a variable directly. The only way I could was to read that character from a file.


If you need a string to include the ", al you should have to do is escape it. """ should return ", i havent tried it though.. so i might be wrong.


I will see if I get the same results to many of the other things that you provided as soon as i get a chance.

Feel free to stop by #MXM on irc if you want to chat about it more...or more frequently.

Edited by koldfuzion, 01 December 2003 - 03:38 PM.


#3 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 01 December 2003 - 04:10 PM

QUOTE (koldfuzion @ Dec 1 2003, 12:37 PM)
QUOTE
3. You can't set " in a variable directly. The only way I could was to read that character from a file.


If you need a string to include the ", al you should have to do is escape it. """ should return ", i havent tried it though.. so i might be wrong.


I will see if I get the same results to many of the other things that you provided as soon as i get a chance.

Feel free to stop by #MXM on irc if you want to chat about it more...or more frequently.

Unfortunatly, I found that """ does not = " nor does %% = %. There seem to be some issues with string handling.

Morden.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users