maybe try....
| CODE |
ATTR update.xbe rw DELETE update.xbe |
i think thats right... its been a while since ive actionscript'ed
tayior7 is probably right... try resetting the read-only attribute.
I'll look into making delete (and a few other commands) a bit more tolerant soon.
(Time to call Japan for work
)
BJ- suggestion for mxm- have the copy command have a feature like
| CODE |
| copy D:\default.xbe E:\blah\default.xbe OR |
where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite)
its a bit harder to do fileexist, delete, copy
I'll try that. ATTR update.xbe rw, or should I use chmod 777?
Also these were really the xbox live xbe file. Casue I deleted them from all my games a long time ago. What I did was renamed a few zip files as placeholders if you will. But still I give that other stuff a try.
As soon as I solve this I'll post it.
| QUOTE (tayior7 @ Apr 2 2004, 12:55 AM) |
BJ- suggestion for mxm- have the copy command have a feature like
| CODE | | copy D:\default.xbe E:\blah\default.xbe OR |
where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite) its a bit harder to do fileexist, delete, copy |
That wouldn't work cause OR is already a function. Perhaps OW.
Or better yet,
copy D:\default.xbe E:\blah\default.xbe 0 = Skip
copy D:\default.xbe E:\blah\default.xbe 1 = Overwrite
copy D:\Folder\ E:\blah\ 2 = Skip All
copy D:\Folder E:\blah\ 3 = Overwrite all
yea, what he said ^^^
Still not working
here's a sample
| CODE |
For i = 0 to 2 If# %File{i}% == 1 Then MsgBox "Live files found$eol$Removing now..." 0 1500 CD %Path%\%GameName% Attr %Live{i}% rw Delete %Live{i}% ;ChMod 777 %Path%\%GameName%\%Live{i}% ;Attr %Path%\%GameName%\%Live{i}% rw ;Delete %Path%\%GameName%\%Live{i}% EndIf Next |
It's all messed up now only cause I'm trying to get it to work
I just found that this an MXM error, not mine.
originally I had it this way.
| CODE |
Set Live0 dashupdate.xbe Set Live1 downloader.xbe Set Live2 update.xbe
|
With this, it wouldn't delete the update.xbe
Then I changed it to
| CODE |
Set Live0 dashupdate.xbe Set Live1update.xbe Set Live2 downloader.xbe
|
And now it's not deleting downloader.xbe
I got it working now,
at the top I have
Set Live0 dashupdate.xbe
Set Live1 update.xbe
Set Live2 downloader.xbe
and later for i = 0 to 2
I changed it to 3, even though there is no 3 and now it works.
Oh yeah, I've noticed that too.
In c/c++ normally, you have
for(int i = 0; i < 3; i++)
And in BASIC you have the equivalent statement
For i = 0 to 2
So MXM is using the BASIC syntax, but not the way it works
Interesting indeed...
Doh!
Well, I'll fix that.... but it might break a few things.
What do you all suggest?
Remember, I'm always up for well thought out, much considered ideas. After all, you guys have done a LOT more actionscripting than I.
Well if it's gonna break a few things, maybe you should leave it.
But I was thing about some IF possibilties. Like,
If %Var% == 1 Set Var2 Value
This way we wouldn't need Then and Elses. Sorta like the If....Goto
I would say ELSEIF's are more important. Even though they can be 'simulated' by using lots of ELSE's, you end up with a ton of ENDIF's at the end
IF x == hello THEN
---
ELSE
IF x == blah THEN
---
ELSE
IF blah == blah THEN
---
ELSE
---
ENDIF
ENDIF
ENDIF
You can stack a bunch of Elses like that? I thought when you use Else, it's a either or type of deal. Meaning you only use one.
But now that I thought about it, couldn't all this If, Else, ElseIf and Set stuff be done just as easily through a Switch?
Not really
Switch doesn't let you do:
if x==1 then
blah
elseif y==2 then
blah
endif
As for the FOR problem, I would say fix it. It might break a few scripts right now, but will prevent hours of hair-pulling later.