PDA

View Full Version : Problem with save incremental



Aquaman
06-15-2004, 07:25 AM
I'm getting an error quite a bit when I try using the save incremental option in modeler.
Eror message: Line 50, illegal arithmetic operation on data type
The only way I have been able to get around it is to save my object as another name then load it back up under the new name then save incremental will work. I'm wondering if anyone else has come across this error.

mattclary
06-15-2004, 08:23 AM
What's the file name and the directory structure you are saving to? Please be specific.

Aquaman
06-15-2004, 08:34 AM
Hi Matt, sorry for not being specific. The file name is Ribbed_Vase.lwo. I think I may have figured it out. It seems that if I name an object with an underscore in it I have to have a numeral at the end of the name for save incremental to work.

brap
06-16-2004, 08:42 AM
Yup, that's a bug alright.
[email protected]

Aquaman
06-16-2004, 09:28 AM
Well I thought I had it figurd out but it appears no matter how I name my files this error can pop up.
Thanks brap for the link.

brap
06-16-2004, 09:39 AM
Like you said, as long as you put a numeral at the end of the filename it seems to be ok. I always do this anyways, which is why I never noticed the problem before.
It's good that all these little things are being discovered now before LW8 final is released.

mattclary
06-16-2004, 10:48 AM
I have not had this issue, I will try to test it tonight. This could be related to the path you are saving to. ARe you using Windows or a Mac?

Aquaman
06-16-2004, 03:02 PM
brap: I normally save out my objects with revision numbers at the end of my file names, however I usually don't do this for the original file. Guess that's why I have come across the error.

matt: I'm on Windows XP Pro. I have three folders called My_Projects that reside under scenes, objects and images within the main content directory.

mattclary
06-16-2004, 04:48 PM
I can't reproduce this. Below is a typical file I've used recently.

C:\Documents and Settings\Matt\My Documents\Projects\LW\ship\objects\shuttle_assembl y_2_v004.lwo

Aquaman
06-16-2004, 04:59 PM
It's not something that happens all the time. I get the error a few times a week. The only thing that seems consistant is that if I put numerals at the end of the file name it starts working again. I've sent Newtek an e-mail on the problem. Deuce has sent a reply back asking some questions so I'll post any new info that comes in.

brap
06-16-2004, 05:12 PM
Originally posted by mattclary
I can't reproduce this. Below is a typical file I've used recently.

C:\Documents and Settings\Matt\My Documents\Projects\LW\ship\objects\shuttle_assembl y_2_v004.lwo

If you change the original file name to: shuttle_assembly, it will give you the error when you go to do an Incremental Save.

colkai
06-17-2004, 03:25 AM
Just tried that on an object here,
PC W2K - no problems at all, doesn't matter what I name my object, the incremental save works fine. Very strange

mattclary
06-17-2004, 05:10 AM
Originally posted by brap
If you change the original file name to: shuttle_assembly, it will give you the error when you go to do an Incremental Save.

I tried this with other file names with underscores and without any numbers in them and could not reproduce it. Brap, you can reproduce this on demand? Please specify a full path and file name that you can reproduce it with. Please put it in the format that I did above.

Aquaman
06-17-2004, 06:05 AM
I'm not able to reproduce the error on demand. It happens sporadically with me. I thought it may have been with using underscores in the names, but now it seems it has no rime or reason. The only thing that seems consistent thus far is putting numbers at the end of the file name. I've had a couple of files that the error popped up on and I renamed the file just changing a few letters in the name and it would still produce the error till I saved it with numbers at the end. Wish that I had saved the files that I received the errors on so other people could try them. Next time I get it I'll make sure I keep the file to let people try out.

-EsHrA-
06-17-2004, 06:21 AM
hello Aquaman,

I have the same problem with incremental save and im on w2k.
Although i found that after if you save the object which gives you the error msg (save object_as), incremental works with exact same name (i didnt change it)...



mlon

brap
06-17-2004, 06:27 AM
Originally posted by mattclary
I tried this with other file names with underscores and without any numbers in them and could not reproduce it. Brap, you can reproduce this on demand? Please specify a full path and file name that you can reproduce it with. Please put it in the format that I did above.

I seem to be able to get this to happen whenever I use an underscore without a numeral at the end of the filename. ie, save this file:
J:\Projects\LW8_Tests\Naming_Test.lwo

Then hit incremental save, gives this:

brap
06-17-2004, 06:48 AM
Update: I think we might have a PC programmer over there at Newtek. :) After a little more testing it seems like it doesn't like an underscore, followed by a 4 letter word.:eek:

colkai
06-17-2004, 07:52 AM
Ok,
Weird, starting from scratch, not saving the object at all prior to trying incremental save...
'thisis_my_test' - fails attempting save, even after saving it explicilty it fails. Renaming (saving under new name) doesn't work "thiswas_my_test".
'thisis_my_base' fails, but 'thisis_my_basis' doesn't - which seems to bear out what Brap is saying.

Certainly email NTek bugs about this, now we can confirm it.

Aquaman
06-17-2004, 11:13 AM
I think brap is on to something. I just made a box. Saved it as Square_test.lwo. Added some more geometry then tried save incremental and error pops up. I then performed another save object as and called this one Square_testa.lwo then added some more geometry, tried save incremental again and it worked like a charm.

colkai
06-17-2004, 01:28 PM
likewise, if you save it as 'my_test_box' there are no problems.
'my_test_boxa' and bang, the error pops up.

Aquaman
06-17-2004, 01:34 PM
Yeah, it definitely appears that the error is related to four letters following an underscore. Add a fifth letter to the name and it'll work or replace any of the four letters following the underscore with a number and it will work.

mattclary
06-17-2004, 03:06 PM
Confirmed. I can reproduce the issue with file neames with an underscore and with 4 letters at the end.

Karmacop
06-17-2004, 08:53 PM
Just wondering, does the script save the incremented files as "file_0001.lwo" ?

faulknermano
06-18-2004, 02:19 AM
funny bug.

colkai
06-18-2004, 02:26 AM
Originally posted by Karmacop
Just wondering, does the script save the incremented files as "file_0001.lwo" ?
Nearly, they are saved as "file_v001.lwo"
So yup, if you're thinking what I think you're thinking ;)
4 digit suffix, like it's getting itself caught up trying to grab the last 4 digits.....

DOH! - Think I just got it, it could be the classic "Numeric from an alpha error", (in our software err:26 - invalid numeric value)

Takes the last 4 digits after the underscore, assumes 1st char to be 'v' and then tries to make a numeric out of the last 3 to increment it for the next save iteration, Bzzztt 'danger Will Robinson'! :p
At least, sound plausible to the programming side of my brain! :D

brap
06-18-2004, 06:50 AM
Newtek, while you're fixing this one, could you do a little something extra: Add an option to change the prefix to the file increment: ie to be able to change the naming scheme from the default of File_v001 to File_r001, or whatnot.

I only ask because my old naming scheme used Version numbers for major file changes, and Revisions for incremental saves. I know it's no big deal, but it would be a nice touch.

Thanks!

colkai
06-18-2004, 07:36 AM
Brap, don't forget to email the bugs dept about this, just in ase no-one at NTek picks this up from the forum.

Aquaman
06-18-2004, 07:59 AM
colkai, I sent an E-mail to Newtek on the bug a few days ago. Deuce has been in contact with me and I have let them know what the recent findings are. This should help them out quite a bit now since they know how to replicate the problem.

Karmacop
06-18-2004, 10:11 AM
Yep colkai, it looks like the script is trying to increment letters .. which never works :p

It should be a simple fix to add more checks in (to make sure it's a number etc), but it's a pitty they script is compiled, otheraise someone could have fixed it. It's not like Alias is about to steal the lscript and add a feature which I'm sure Maya already has ...

faulknermano
06-18-2004, 08:38 PM
i use this.. but it's naming convention is the NOT the same.

it creates a specific directory per object that you use this script on and saves out a file there containing the date and time you saved it.



@warnings
main // incremental saver
{
selmode(GLOBAL);
md[1] = nil;
objectDir = getdir(OBJECTSDIR);
meshFilename = Mesh(0).filename; // fullpath

mesh = Mesh() || error("No mesh.");
m = 0;
while(mesh)
{
m++;
if(mesh.name == "Unnamed")
error("<br>Object number ",m," is unnamed.");
mesh = mesh.next();
}


if(meshFilename == nil)
{
if(pointcount())
{
f = getfile("Save Object As...","*.lwo",objectDir);
if(f)
save(f);
}
return;
}

save(meshFilename);
(d,p,f,e) = split(meshFilename);

s = string("backup_",f);
md = matchdirs(objectDir,s);
if(md.size() > 1)
error("More than one matching directories were found. Aborting.");

if(!md) // no folders exist
{
// create a folder
str = string(d,p,"backup_",f);
mkdir(str);
backupDir = str;
}
else
backupDir = string(d,p,"backup_",f);

// scan the backupdir

dd = date();
d1 = dd[1];
mon = dd[2];
year = dd[3];
tt = time();
h = tt[1];
m = tt[2];
s = tt[3];
day = string(d1);
mon = string(mon);
year = string(year);

if(day.size() < 2)
day = string("0",day);
if(mon.size() < 2)
mon = string("0",mon);


hs = string(h);
ms = string(m);
ss = string(s);



if(hs.size() < 2)
hs = string("0",hs);
if(ms.size() < 2)
ms = string("0",ms);
if(ss.size() < 2)
ss = string("0",ss);

finalName = string(year,"_",mon,"_",day,"_",hs,".",ms,".",ss); // finalName is the incremented save

mf = matchfiles(backupDir,"*.lwo");
if(mf.size() >= 15) // start replacing
{
mf.sortA();
str = string(backupDir,"\\",mf[1]);
a = filedelete(str);
}

newFile = string(backupDir,"\\",finalName,".lwo");
a = filecopy(meshFilename,newFile);

}

blueshift
03-31-2007, 06:24 PM
I got the same error with nameing my file Vette_tute. Added a 1 to tute I.E. Vette_tute1 then it save incrementally. Thanks people.