Автор |
Сообщение |
|
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Читают эту тему:
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
-
Back to forum -
Previous -
Next
17516 Views, 9 Replies
06-10-2017
01:37 AM
compile error: unexpected end of script
Hi, before 3ds max is working properly few days before we change our office than i lost my DVI cable after we put new one than its shown view pot blank than i change the display driver selection — Legacy Open GL, after i open 3ds max its showing compile error: unexpected end of script please tell me how can i solve this issue. [3ds max 2016]
-
Back to forum -
Previous -
Next
9 REPLIES 9
06-15-2017
06:02 PM
Hello @noushi.mlp and welcome to the community,
That is strange. My first suggestion is to reset your user settings, can you please try that for me? Unexpected end of script makes me think that something got corrupted and just needs to be reset. Please let me know if it works.
Best Regards,
06-16-2017
04:47 PM
Hello @noushi.mlp,
I just wanted to follow up here, any progress on this issue?
Best Regards,
12-13-2017
05:59 AM
THANK YOU VERY MUCH man i had the same problem, and i did what u said and it`s worked
THAAAAAANK YOU
05-16-2018
02:58 AM
Thank you , thank you, thank you veeeeeeeeeeeery much!!! Love you Autodesk!!!
04-11-2020
07:50 AM
amazing! I have same issue in 3ds max2018 and it work!!
Thank you so much!
05-14-2020
03:13 PM
Hi I read you answer helped many people but if i follow the steps
….and using the path below .
C:Users<username>AppDataLocalAutodesk3dsMax20XX — 64bitENU
I can’t find the folder?? in order to rename the ENU folder to ENU_old.
if i go to C: Users
than that’s it the rest is not there?
06-30-2020
11:15 AM
Hi Michal,
Can you please confirm if you’ve followed the instructions I sent earlier about showing Hidden Files and Folders in Windows, and then resetting your 3ds Max preferences? Did this fix your issue?
Please let us know, and we hope to hear from you soon!
Jon A. Bell
Senior Technical Support Specialist, 3ds Max
-
Back to forum -
Previous -
Next
- Главная
- Статьи
- Советы и приемы
- Error Unexpected end of script
Откуда появляется данная ошибка
Иногда, при запуске 3Ds Max, по непонятным причинам может возникать ошибка «MacroScript Compile» с текстом «— Compile Error: Unexpected end-of-script — In Line: — This check …»
Эта ошибка возникает вследствие, того, что некоторые плагины, такие как V-Ray Renderer или Corona Renderer, могут записывать свои скрипты в определенные системные папки 3Ds Max и при попытке такой записи возникает сбой. Поэтому скрипты могут не создаваться или быть частично записаны.
Пример такого скрипта с ошибкой, вы можете видеть на скриншоте ниже:
Loading…
Решение проблемы
Нажмите кнопку F11 для открытия Maxscript Listener (лог ошибок компиляции), вы увидите ошибку связанную с временным скриптом __temp***.mcr.
Необходимо скопировать данный путь и вставить в файловом менеджере, затем просто найти и удалить забагованный файл.
Loading…
Внимание!
Ни в коем случае не пытайтесь удалить целую папку ENU, как пишут на многих форумах! Это может привести к потери многих настроек и прервет ваш рабочий процесс! Необходимо удалить только один файл, который вызывает проблему!
Готово! Попробуйте перезапустить 3Ds Max, ошибки теперь быть не должно! 🙅
Top
ПОДПИШИСЬ НА СВЕЖИЕ НОВОСТИ
{{subscribeMsg}}
1 / 1 / 1 Регистрация: 24.02.2012 Сообщений: 150 |
|
1 |
|
3ds Max 21.05.2016, 11:52. Показов 6656. Ответов 4
Запустил программу,нажал f11,потом ctrl+n,забил туда вот такой скрипт нажимаю ctrl+e на выходе выдает вот такое Как быть?
__________________
0 |
SherHun 31 / 31 / 22 Регистрация: 22.06.2015 Сообщений: 102 |
||||||||
21.05.2016, 14:00 |
2 |
|||||||
undefined — не открылся значит файл. Проверяйте перед чтением
или что-нибудь такое изобразить
0 |
1 / 1 / 1 Регистрация: 24.02.2012 Сообщений: 150 |
|
21.05.2016, 15:57 [ТС] |
3 |
SherHun, Миниатюры
0 |
31 / 31 / 22 Регистрация: 22.06.2015 Сообщений: 102 |
|
21.05.2016, 17:34 |
4 |
Скрипт запустил без проблем.
unexepted end of script ну правильно, что-то своё вписали а скобку закрывающуюся не добавили, скорей всего.
0 |
TanaTiX |
22.05.2016, 08:05
|
Не по теме: Nightway, в следующий раз потрудитесь скопировать текст ошибки и дать внятное название темы.
0 |
Bug tracing and error finding sometimes takes longer than writing the original script! Here are some examples of error messages and what they could mean….
Don’t forget the Brackets!
-- Error occurred in anonymous codeblock; filename: ; position: 20; line: 3 -- Compile error: Unexpected end-of-script -- In line: -- Error occurred in anonymous codeblock; filename: ; position: 24; line: 4 -- Syntax error: at ), expected <factor>-- In line: )
This normally means you’ve missed out or got an extra parentheses (bracket) somewhere, brackets always go in pairs to have a look through and make sure you don’t have an odd number. See the previous post about interrupting which happens with missing brackets.
What should I do?
-- Error occurred in anonymous codeblock; filename: ; position: 54; line: 4 -- Syntax error: at (, expected do -- In line: (
It can also happen when you’ve got a ‘do’ error, this error happens if you were to miss out a parameter when pressing a button for instance…
on btn_testbutton do ( --do something )
which of course should be
on btn_testbutton pressed do ( --do something ) Who you trying to call? -- Type error: Call needs function or class, got: undefined Selext $Box*
I’ve type something that Maxscript doesn’t know of… in this (simple) case it’s a typo, it should of course be ‘Select’, but recognise that using the select function is calling a function with a parameter. We could get this error when there is no typo, but actually the function we’re trying to call is out of scope, or hasn’t been defined at all.
See the below example, the testMe function is only defined within the scope of the If test, it doesn’t exist outside it, so although we’re trying to call testMe() later on which isn’t a typo, we can’t call the function because it’s not available to the scope (sometimes easiest to think indentation level with brackets (if you format your code correctly)).
( t = 5 if t == 10 do ( fn testMe = ( print "test" ) ) testMe() )
This will become apparent when your scripts start to become more complicated, but good to be aware of.
Other causes of it happen when you are constructing values for example and you forget to put a + in… example…
( a = 4 b = 10 c = a b )
Which if we look at our MaxScript Listener….
-- Error occurred in anonymous codeblock; filename: ; position: 26 -- Frame: -- a: 4 -- c: undefined -- b: 10 -- Type error: Call needs function or class, got: 4
Of course we probably meant c = a + b, but by not putting the + in MaxScript is thinking we’re trying to call a function with the name a and passing a variable b to the function.
We could have done something silly like re-using a variable name…
( fn a theval = ( 10 * theval ) a = 4 b = 10 c = a b )
In this instance we’ve got a function assign to the variable a but then we’ve reassigned the value a to = 4 so we can’t call our function a again, this is where clear naming conventions comes in and are really important so you know what types of variables are applied to which types of values.
How many Arguments are we going to have then?
When you call a function or a method from an interface you sometimes need to supply arguments….
viewport.setRegionRect() -- Argument count error: SetRegionRect wanted 2, got 0
In this case a simple built-in maxscript function for setting the viewport region rendering rectangle requires two arguments but we haven’t given it any…. Looking in the help file we find..
viewport.setRegionRect <viewport index> <box2>
So it’s asking us for an index number (indexes are integers, whole numbers) and then a box2 value, which we’ll come back to another day, which for example could be
(Box2 0 0 100 100)
Defining a box 100 pixels wide and high originating in the 0,0 screen position, so to get our function to work we would need to do something like…
viewport.setRegionRect 1 (Box2 0 0 100 100)
And it’ll work…. But notice how important the brackets are in this case, it groups all the values associated with the creation of a box2 value together… otherwise max gets confused between which values are for which function….
viewport.setRegionRect 1 Box2 0 0 100 100 -- Argument count error: SetRegionRect wanted 2, got 6
In this case it’s not recognising which values to pass an an argument, if in doubt put brackets in.
However if we only gave it one argument…
viewport.setRegionRect 1 -- Argument count error: SetRegionRect wanted 2, got 1
We’d get our initial error again, but this time telling us it’s got 1 argument but wanted 2, Similarly if we gave it too many arguments (even with our box2 value in brackets)….
viewport.setRegionRect 1 (Box2 0 0 100 100) 3 -- Argument count error: SetRegionRect wanted 2, got 3
Again we get an error…. Notice that our arguments aren’t separated by commas, if you try this you’ll get the following error…
viewport.setRegionRect 1, (Box2 0 0 100 100) -- Argument count error: SetRegionRect wanted 2, got 1 -- Syntax error: at ),, expected <factor> -- In line: viewport.setRegionRect 1, (
Which is basically complaining that our formatting is incorrect…. If we gave it an incorrect value type….
viewport.setRegionRect 1 100 -- Unable to convert: 100 to type: Box2
Then it doesn’t know how to change the value 100 to a box2 type value… Similarly if we tried to pass it a variable that was undefined we’d get the following error…
viewport.setRegionRect 1 thebox
— Unable to convert: undefined to type: Box2
Where is the do?
for o in theObjs o.renderable = true -- Error occurred in anonymous codeblock; filename: ; position: 483; line: 33 -- Syntax error: at ), expected "do" or "collect" -- In line: )
In this case we’ve simply missed out a do…. or a collect (Which I haven’t covered yet..)
for o in theObjs do o.renderable = true
If you are using ‘collect’ then you don’t need a ‘do’ as well or you’ll get the following error, but I’ll come back to this later in my ramblings.
myObjs = for o in geometry where o.name == "Sphere" do collect o -- Syntax error: at collect, expected <factor> -- In line: myObjs = for o in geometry where o.name == "Sphere" do collect o
So the following will work
myObjs = for o in geometry where o.name == "Sphere" collect o
-
Главная
-
YOUR CALL
-
3DS Max Compile error Unexpected end of script
Просмотров: 2 179
Если вам понравилось бесплатно смотреть видео 3ds max compile error unexpected end of script онлайн которое загрузил YOUR CALL 04 сентября 2020 длительностью 00 ч 02 мин 58 сек в хорошем качестве, то расскажите об этом видео своим друзьям, ведь его посмотрели 2 179 раз.
Sillvia Asaad
1 неделя назад
Thanks God save you
Shamim Ahamad
1 месяц назад
👍 Excellent 👍
jorchbicle
2 месяца назад
GRACIAS HERMANO!! ME SALVASTE!!… SALUDOS!
Aniket Dixit Official
7 месяцев назад
thanks
syed shabbir hussain
7 месяцев назад
thanks bro it worked for me 🤩
Lucho Muñoz
8 месяцев назад
Thanks from Argentina!
AA Blog
10 месяцев назад
Thanks 😊👍🏻👍🏻😊
nguyen giap
1 год назад
thank pro
sathish cravi
1 год назад
Merakku nai salve
ds architecture studio
1 год назад
Thanks again
Sahana Ali
1 год назад
Thankyou so muchhh may allah bless you………
Olatz Pedraza Machado
1 год назад
Thank you SO MUCH!!! You’re a gift to the world
Suchit Gowda
1 год назад
Thank You so much
Khadiza Khatun
1 год назад
ENU_ old option ta asse na kno?
bob bob
1 год назад
thanks thanks thanks you safe me
Biju kumar
1 год назад
Thank you ….
farmanullah khan
1 год назад
thankkkkkkkkkkkkkkk uuuuuuuuuuuuuuuuuuuuuu soooooooooooooooooo much
PHOTO FOCUS
1 год назад
Thanku sir
jyothishal
2 года назад
Good one …. or delete all files from :- C:UsersXXXXXAppDataLocalAutodesk3dsMax202X — 64bitENUusermacros & Restart 3DS Max…. will work
claudia cumian castillo
2 года назад
thank you!
Сейчас смотрят
00:03:13
BEKBOLAT — Topic
1 неделя назад
1 778 просмотров