PDA

View Full Version : Different 3dsmax languages = different maxscript results?


ivanisavich
10-12-2009, 12:49 PM
Been working on a script that some testers have reported generates errors in non-English versions of 3dsmax.

Here is a snippet of code that apparently generates an error in French versions of 3dsmax, but runs fine in English versions.


function appendifunique1 a b =
(
if a.count > 0 then
(
for j in 1 to a.count do
(
if a[j] == b then exit

if j == a.count then a[a.count +1] = b


)
)else a[a.count +1] = b


)


a = #("1.jpg","2.jpg")
b = #("3.jpg","4.jpg")

c = join a b

d = getfiles ("c:\\*.*")


for j in 1 to d.count do
(
appendIfUnique1 c d[j]

)

f = filenamefrompath a[1]



The error generated, in French 3dsmax, is:


Maxscript FileIn Exception



--Erreur de syntaxe: then, attendu <facteur>

--Dans ligne: if a.count > 0 then si a.count > 0 Then




Any ideas as to what's going on?

marktsang
10-12-2009, 04:15 PM
Could it be special characters? or or other characters used in filenames but not supported in maxscript? I think I have seen this before when we had a Icelandic guy working In the studio and him naming things in his mother tongue breaking scripts...
Worth a look perhaps!!!

groutcho
10-13-2009, 03:28 PM
si means if in French. It is strange that the Maxscript error message keeps the first if in english and the second one in French...

CerberusC
10-14-2009, 12:05 AM
Dont you need an expression like that ">=" or "<=" to compare something with the If statement instead of just "<" or ">"?

Cheers.

eek
10-14-2009, 12:39 AM
Dont you need an expression like that ">=" or "<=" to compare something with the If statement instead of just "<" or ">"?

Cheers.

< and > are smaller or greater to

<= and >= are smaller than /equal to or greater than /equal to

CGTalk Moderation
10-14-2009, 12:39 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.