[Closed] Different 3dsmax languages = different maxscript results?
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?
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!!!
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…
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