Ilin Andrian 0 / 0 / 0 Регистрация: 05.03.2022 Сообщений: 65 |
||||
1 |
||||
05.03.2022, 16:09. Показов 839. Ответов 7 Метки метка (Все метки)
Когда я писал код для файла с расширением vbs – мне выдаёт такую ошибку, что делать? Сценарий: CUsersUserDesktopvbs.vbs Код:
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
05.03.2022, 16:09 |
Ответы с готовыми решениями: Ошибка: Индекс находился вне границ массива. В чём проблема? Проблема с функцией loop EVFUN: Не найдена функция LOOPFOR… проблема с командой loop Open Loop и Closed Loop системы, какие утверждения верны? Найти среднее арифметическое отрицательных чисел, введенных с клавиатуры, используя do-loop while/do-loop until 7 |
2875 / 1708 / 204 Регистрация: 28.10.2011 Сообщений: 6,354 Записей в блоге: 6 |
|
05.03.2022, 17:09 |
2 |
мне выдаёт такую ошибку
Ошибка ‘loop’ вне ‘do’ И что из этого непонятно?
что делать? Посчитайте число if и завершающих их end if.
0 |
0 / 0 / 0 Регистрация: 05.03.2022 Сообщений: 65 |
|
05.03.2022, 17:16 [ТС] |
3 |
Ничего не понял можно по подробней. Я просто ещё ничего не понимаю.
0 |
I can bite 3679 / 3212 / 702 Регистрация: 13.04.2015 Сообщений: 7,493 |
||||
05.03.2022, 17:28 |
4 |
|||
1 |
Ilin Andrian 0 / 0 / 0 Регистрация: 05.03.2022 Сообщений: 65 |
||||||||
05.03.2022, 17:32 [ТС] |
5 |
|||||||
Пишу ещё раз. Что мне делать если выдаёт такую ошибку – Сценарий: CUsersUserDesktopvbs.vbs Код:
Ну а если убрать –
То ошибка пропадает, но мне нужно сделать так что бы можно было вписать несколько текстов и открывались bat и текстовые файлы. Помогите пожалуйста!!
0 |
bite 3679 / 3212 / 702 Регистрация: 13.04.2015 Сообщений: 7,493 |
|
05.03.2022, 19:01 |
6 |
То ошибка пропадает, но мне нужно сделать так что бы можно было вписать несколько текстов и открывались bat и текстовые файлы. Помогите пожалуйста!! Я же дал код полностью. В чём проблема? Добавлено через 6 минут
Что мне делать если выдаёт такую ошибку – End If ‘ написать между пятой и шестой строкой, или использовать мой пример.
0 |
2875 / 1708 / 204 Регистрация: 28.10.2011 Сообщений: 6,354 Записей в блоге: 6 |
|
05.03.2022, 19:59 |
7 |
Ничего не понял можно по подробней. Вы считать не умеете?
2 |
bite 3679 / 3212 / 702 Регистрация: 13.04.2015 Сообщений: 7,493 |
|
05.03.2022, 20:01 |
8 |
Вы считать не умеете? Он не считатель
2 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
05.03.2022, 20:01 |
Помогаю со студенческими работами здесь Как создать 4 варианта программы c For/Next,Do While / Loop, Do Loop /Until , If Then Goto Нужно написать программу с циклом Do While.Loop или Do.Loop Until Как проверить подключен ли javascript или у меня другая ошибка,у меня на сайте этот код не работает $result =… В чём у меня ошибка? Поправьте меня <?… Warining For-loop variable ‘i’ may be undefined after loop Warining For-loop variable ‘i’ may be undefined after loop var implementation… Искать еще темы с ответами Или воспользуйтесь поиском по форуму: 8 |
Доброго времени суток.
Задумка такова:
1. Установить счётчик строк на 38.
2. Если ячейка в столбце А (строка – по счётчику) не пустая, выполнить п.3-5. Если пустая, остановить программу.
3. Если ячейка в определённом столбце той же строки имеет значение “Оплачено”, изменить цвет шрифта в ячейке столбца А той же строки. Если нет, перейти к п.4.
4. Увеличить счётчик строк на единицу.
5. Перейти к п.2
Код:
Sub Hilight ()
Dim taskcell as Integer
taskcell = 38
Do Until Range(“A” & taskcell).Value = “”
If Range(“A” & taskcell).Offset(0, 2 + User) = (“Оплачено”) Then
Range(“A” & taskcell).Font.ColorIndex = 16
Else
taskcell = taskcell + 1
Loop
End Sub
При запуске выдаётся сообщение “Compile error: Loop without Do”. Помогите понять ошибку.
Перейти к контенту
Выдает ошибку «Loop without Do» хотя Do есть |
||||||||
Ответить |
||||||||
Ответить |
||||||||
Ответить |
||||||||
Ответить |
||||||||
Ответить |
||||||||
Ответить |
I’m trying to implement a simple Newton’s method iterative solver using Excel VB (I have never used VB.)
I keep getting the error loop without a Do
and I can’t figure out what I’m doing wrong here.
I’m trying to find the roots of the function z^3 - z^2 - (B^2 + B - A)z - A*B
called the compressibility factor.
My source MSN
Function zCalculation(ByVal temp As Double, ByVal press As Double) As Double
Dim tempCr As Double
Dim pressCr As Double
Dim A As Double
Dim B As Double
tempCr = temp / 238.5
pressCr = press / 547.424092
A = pressCr / tempCr
A = A / (9 * (2 ^ (1 / 3) - 1))
B = pressCr / tempCr
B = B * (2 ^ (1 / 3) - 1) / 3
Dim zNot As Double
Dim counter As Integer
counter = 0
zNot = 1#
Do
counter = counter + 1
zNot = zNot - (zNot ^ 3 - zNot ^ 2 - (B ^ 2 + B - A) * zNot - A * B) / (3 * zNot ^ 2 - 2 * zNot - (B ^ 2 + B - A))
If counter > 1000 Then
Exit Do
Loop Until eval(zNot, A, B) < 0.000001
zCalculation = zNot
End Function
break
Function eval(ByVal z As Double, ByVal A As Double, ByVal B As Double) As Double
eval = z ^ 3 - z ^ 2 - (B ^ 2 + B - A) * z - A * B
End Function
asked Dec 9, 2013 at 16:58
Felix CastorFelix Castor
1,5691 gold badge17 silver badges38 bronze badges
You need an:
End If
in your code.
answered Dec 9, 2013 at 17:04
Gary’s StudentGary’s Student
95k9 gold badges58 silver badges97 bronze badges
2
You can try:
Function zCalculation(ByVal temp As Double, ByVal press As Double) As Double
Dim tempCr As Double
Dim pressCr As Double
Dim A As Double
Dim B As Double
tempCr = temp / 238.5
pressCr = press / 0.546789
A = pressCr / tempCr
A = A / (9 * (2 ^ (1 / 3) - 1))
B = pressCr / tempCr
B = B * (2 ^ (1 / 3) - 1) / 3
Dim zNot As Double
Dim counter As Integer
counter = 0
zNot = 1#
Do
counter = counter + 1
zNot = zNot - (zNot ^ 3 + zNot ^ 2 - (B ^ 2 + B - A) * zNot - A * B) / (3 * zNot ^ 2 + 2 * zNot - (B ^ 2 + B - A))
If counter > 1000 Then
Exit Do
End if ' <--- Here
Loop Until eval(zNot, A, B) < 0.000001
zCalculation = zNot
End Function
answered Dec 9, 2013 at 17:06
1
Sub datacalculationsandformat()
Dim row As Integer
row = 2
Do While Cells(row, 2) <> ""
Cells(row, 3).Value = Cells(row, 2).Value * 0.3
Cells(row, 4).Value = Cells(row, 2) * 0.1
Cells(row, 5).Value = Cells(row, 2).Value + Cells(row, 3).Value + Cells(row, 4).Value
If Cells(row, 5).Value >= 8000 Then
Worksheets("Sheet1").Cells(row, 5).Font.Bold = True
row = row + 1
Loop
slavoo
5,64864 gold badges36 silver badges39 bronze badges
answered Sep 21, 2017 at 5:11
zzoommmmmm 0 / 0 / 0 Регистрация: 13.12.2011 Сообщений: 6 |
||||
1 |
||||
13.12.2011, 17:58. Показов 6779. Ответов 3 Метки нет (Все метки)
Найти первый отрицательный член последовательности cos(ctg(n)) для n изменяющегося следующим образом: n = 1, 2, 3, … .
Помогите исправить код, пишет ошибку «Loop without Do». Заранее спасибо!)
__________________ 0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
13.12.2011, 17:58 |
Ответы с готовыми решениями: Почему в коде указано, что » кнопка 1 » и » кнопка 2 » добавлены в центр, а они добавляются «по умолчанию»? import java.awt.*; import javax.swing.*; @SuppressWarnings("serial")… В строке все буквы «а» заменить буквой «б» и наоборот, если они есть Составьте программу, выясняющую, есть ли в слове Х хотя бы одна из букв «о» или «а» Выясните, есть ли в слове X хотя бы одна из букв «к» или «м» 3 |
es geht mir gut 11264 / 4746 / 1183 Регистрация: 27.07.2011 Сообщений: 11,437 |
|
13.12.2011, 18:20 |
2 |
11 и 12 строку поменяй местами, у меня был точно такой же случай. 1 |
Alex77755 11464 / 3757 / 675 Регистрация: 13.02.2009 Сообщений: 11,098 |
||||
13.12.2011, 18:25 |
3 |
|||
11 и 12 строку поменяй местами, у меня был точно такой же случай. Вообще убери. Уже есть условие
1 |
0 / 0 / 0 Регистрация: 13.12.2011 Сообщений: 6 |
|
13.12.2011, 18:25 [ТС] |
4 |
11 и 12 строку поменяй местами, у меня был точно такой же случай. Спасибо, помогло) 0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
13.12.2011, 18:25 |
Помогаю со студенческими работами здесь Выясните, есть ли в слове Х хотя бы одна из букв «о» или «а» Дана строка, состоящая из слов, разделенных пробелом. Определить количество слов, в которых есть хотя бы одна буква «а», или «А» Непонятная ошибка » For loop control variable must have ordinal type» interface uses Патерн «прототип» не работает, выдаёт ошибку «недопустимый вызов нестатической ф-ции», где я в коде ошибка? #include <iostream> Искать еще темы с ответами Или воспользуйтесь поиском по форуму: 4 |
-
Mar 8th, 2011, 03:27 PM
#1
Thread Starter
New Member
[RESOLVED] Compile Error:Loop Without Do
I get a compile error saying,
Loop Without do. I really have no idea what that means. I’d appreciate any help i could get.Code:
' ok? If ((WeekdayName(Weekday(LoanExpiryDate - 1)) = "Saturday") Or (WeekdayName(Weekday(LoanExpiryDate - 1)) = "Sunday") Or (libraryopendate = False)) Then ' no good! either the date we're trying is in a weekend or its when the library is open, add one onto the date and try again LoanExpiryDate = LoanExpiryDate + 1 Else dateok = True End If Loop End Sub
-
Mar 8th, 2011, 03:36 PM
#2
Re: Compile Error:Loop Without Do
Welcome to VBForums.
You need a Do to go along with the loop. I’m not sure where you want it to be but this would compile:
Code:
Do If ((WeekdayName(Weekday(LoanExpiryDate - 1)) = "Saturday") Or (WeekdayName(Weekday(LoanExpiryDate - 1)) = "Sunday") Or (libraryopendate = False)) Then ' no good! either the date we're trying is in a weekend or its when the library is open, add one onto the date and try again LoanExpiryDate = LoanExpiryDate + 1 Else dateok = True End If Loop
-
Mar 8th, 2011, 04:08 PM
#3
Thread Starter
New Member
Re: Compile Error:Loop Without Do
Thank you very much for the reply. is there anyway to PM you on here? perhaps by email? MSN?
-
Mar 8th, 2011, 04:10 PM
#4
Re: Compile Error:Loop Without Do
Beware that it will land you into an endless loop.. ultimately crashing your program.
For it to work successfully, you need to provide some exit condition from the loop
e.g.Code:
'Method 1 Do While (condition) ... Loop 'Method 2 Do ... Loop While (condition) 'Method 3 Do ... If (some condition) Then Exit Do ... Loop
There are more ways, but one of these three should suffice.
-
Mar 8th, 2011, 04:14 PM
#5
Thread Starter
New Member
Re: Compile Error:Loop Without Do
Thanks for the reply Pradeep. Really appreciate it. Check your PM when you get a chance
-
Mar 8th, 2011, 04:32 PM
#6
Re: Compile Error:Loop Without Do
Sorry I don’t answer coding questions via PM. It defeats the purpose of this forum.
Please post your question here and I’ll help you in whatever way I can.
-
Mar 8th, 2011, 04:48 PM
#7
Thread Starter
New Member
Re: Compile Error:Loop Without Do
-
Mar 8th, 2011, 05:04 PM
#8
Re: Compile Error:Loop Without Do
Is this what you’re trying to do?
Code:
Do Until dateok = True ' ok? If ((WeekdayName(Weekday(LoanExpiryDate - 1)) = "Saturday") Or (WeekdayName(Weekday(LoanExpiryDate - 1)) = "Sunday") Or (libraryopendate = False)) Then ' no good! either the date we're trying is in a weekend or its when the library is open, add one onto the date and try again LoanExpiryDate = LoanExpiryDate + 1 Else dateok = True End If Loop
Build Errors¶
These are only relevant when building with a Mac and Xcode.
For GitHub (Browser Build) errors, please see: GitHub Errors
There are two types of build indications that may be seen: they are warnings (yellow or purple icons) and red errors. You’ll see the warnings and errors in the left-hand column of the Xcode window.
Yellow and Purple warnings do not cause the build to fail, those are just warnings. You will often see yellow and purple icons. Ignore those. Do not try to do anything to fix those.
Red errors will have to be resolved before you can successfully build the Loop app. The steps below explain how to resolve them based on the messages you are seeing.
Xcode Not Responding¶
Sometimes, Xcode stops responding. You have to fix this before any of the other steps on this page will help. The signature is that Xcode shows a colorful spinning icon and does not respond to anything you do.
This can happen sometimes. You just need to force quit Xcode. Sometimes rebooting the Mac may be required, but start with force quit. Then just open up Xcode again and keep going.
- Hold down these 3 keys Option+Cmd+Esc (or Alt+Cmd+Esc), until the
Force Quit
menu appears (should be fast) - Select
Xcode
and tap on theForce Quit
button
Start with The Obvious Error Causes¶
New Loop Builders
This page contains build error help for people updating their Loop app as well as brand new Loop app builders. Review the “obvious” errors causes first. If that doesn’t help, then, skim the page until you reach Find Your Error Message or search the page (Cmd+F) or search LoopDocs for your error. Once you’ve identified your error message, try to resolve it. Still stuck? Read Posting for Help
Before you start trying to resolve your red errors, start with the most obvious things that can cause a red error message:
-
For older builds, before 3.2.0, you had to select Loop(WorkSpace) The first time you build after downloading new code, you had to manually select Loop (Workspace) instead of Loop in Xcode.
- Starting with Loop 3.2.0 and newer versions, the target name and xcworkspace file names are now automatically LoopWorkspace – no special action needed when building.
-
Did you check that you have the minumum Xcode version for your iOS? This is critical. If you are updating your Loop app, please review the iOS driven requirements for minimum version of macOS and Xcode.
-
Did you check your Apple developer account for new license agreement? Periodically, Apple will release a new developer license agreement that you need to sign before you can build new apps. You will get a build failure if there is a pending license agreement to sign. Login to your Apple developer account to check if there’s a new license agreement.
-
Do you have a new computer, never used to build Loop? Did you Add Apple ID to Xcode?
-
Did you reboot, i.e., restart, your computer after updating Xcode? You should reboot following Xcode installation or update and you must make sure your command line tools match the version of Xcode you just installed. Xcode Command Line Tools
-
Did you get a fresh download of Loop code? If you tried to build with an old download that you used a long time ago, that old version may not be compatible with the new iOS and Xcode versions. Check also, that you are actually using the new download in Xcode. When you use the Build Select Script, it automatically opens Xcode using the new download.
If you want to build using a recent download, this section tells you how to Find My Downloaded Loop Code.
-
Are you are using a free developer account? Make sure you finished the removal of Siri and Push Notification capabilities described in the Free Account link.
-
DO NOT USE BETA VERSIONS If you are using an iOS beta version or an Xcode beta version, Loop might not build. Deleting iOS beta from a phone is a pain…so don’t install it unless you know what you are doing.
Fix 95% of errors¶
If you have checked all those steps above and think you have a true build error, here’s a tip that resolves 95% of all build errors when updating Loop code.
- Open your project in Xcode as normal. Then go to the menu bar at the top of the screen and find the
Product
menu item. Use the drop down selection forClean Build Folder
or press Shift+Cmd+K. Either will work the same. Wait for the clean to finish before trying to build again. - On the far right, next to the name Full Path is the folder name that Xcode will be using to build. Make sure it is the new code you just downloaded and not an older folder.
- If you are updating Loop and did not Delete Old Provisioning Profiles, do it now
- Return to Xcode and try building your app again.
- Still failing for phone or watch or both? Try the Unpair and Reboot procedure.
Unpair and Reboot¶
This is reported to fix a variety of watch building errors and cannot prepare phone for development
errors:
- Open Xcode (if not already open)
- Plug phone into computer and make sure it is unlocked
- Using the Xcode menu, select
- Windows
- Devices and Simulators
- On left side, Right-Click (or Control-Click) on your phone
- Choose Unpair Device
It may not be necessary, but the suggestion is to reboot phone, (watch) and Mac – in other words, you can try to build without rebooting, but if that fails, repeat the steps and reboot before trying again.
The next time you plug this phone into your computer, you will be asked to trust the computer on the phone (and watch). Note this is unpairing the device from Xcode and your computer, not the same as, and much faster than, unpairing your watch from your phone.
If the build fails again, look through the list below and see if you can match your error message with one of the error messages listed later in this page. If you really can’t find your solution, then post for help. But help us help you.
- Ignore yellow and purple warning messages – those are not errors – do not try to fix them
- Confirm it really is an error not already on this page; read this page carefully, including all the circled bits in the images in the Specific Error Messages section
- Follow the steps in the Posting for Help section
- WE CANNOT HELP without version numbers and screenshots
- Do not take pictures of your computer screen with your phone, use screenshots
New with Xcode 14¶
This may change, but for now, the watchOS simulator is not automatically included with the Xcode 14.x download and install. Some version of the watchOS simulator is required to build Loop, independent of whether you use a watch.
You will be asked if you want to download & install. Make sure watchOS is selected.
If you are getting watch errors or having trouble with your watch, try this:
Tap on the Xcode name on the menu bar and select Settings (used to be called Preferences).
Choose the Platform tab. If there is a missing watchOS simulator that you think might help, then download it using the GET
button. Use the minus icon (bottom left) to remove simulators that are no longer being used. (The watchOS 9.0 is required to build with Xcode 14.0.1. The watchOS 9.1 was downloaded with a release candidate for Xcode 14.1 – your screens may look different.)
Posting for help¶
STOP!! Read this section! Important!
Before you post in a Loop Social Media site asking for help with build errors, do your work first. The build errors listed below (and the checks listed above) will fix most of problems you may encounter. PLEASE READ THIS PAGE. The volunteers answering questions online would love to spend more time helping people use Loop and less time answering questions that can be addressed by using this page.
Therefore, try to resolve your build error yourself. Then, if you need to post for help, please include enough information with the post so the volunteers know where you are in your troubleshooting attempts.
Your Post Must Include:
- The version of Xcode you are using
- The version of Loop you are building with
- The version of iOS on your Loop iPhone
- Free or paid account, and if free, confirmation that you deleted Siri and Push Notification capabilities
- Confirmation that you are not using an Xcode beta or iOS beta version (so we don’t have to ask, please actually type “I am not using beta versions”)
- Screenshots of your WHOLE Xcode window and/or Terminal window showing your error and any messages you’ve seen while working through the build errors/solutions. Do NOT use phone photographs of your computer screen. See below for instructions on how to capture a screenshot.
- State which fixes from the list below you have already tried AND post the screenshots of the results of those fix attempts.
Screenshots¶
Please take screenshots of your issue and use them in your posts. On an Apple computer, press Shift+Cmd+4 keys at the same time followed by pressing the space bar Space and then click on the window of interest. The screenshot will be saved to your desktop with a file name starting with the name “Screen Shot”. Use screenshots instead of cell phone images or words whenever possible. Screenshots are higher resolution and easier to read.
Use the whole Xcode window screenshot when posting for build help.
Find Your Error Message(s)¶
To begin fixing the error, use the Report Navigator view to find your error message.
The key is to (1) READ THE ERROR MESSAGE and then (2) FIND YOUR MESSAGE IN ONE OF THE TOPICS BELOW.
Here’s a super tip: Merely seeing the “exit code” in Xcode is not enough information to discern what error is causing your build to fail; some exit codes have multiple causes. Look at the detailed message to guide your search for the matching solution.
Notice the screenshots below have red circles highlighting certain error messages. Read your error message(s) from your screen, being guided by the red circles in the screenshots. Once you find your error message (hint: not “exit code”), you can either:
-
Take the error message from your Xcode screen and use LoopDoc’s search function to enter in some of that phrase to bring up the appropriate solution topic, or
-
Take the error message from your Xcode screen and read through EACH OF THE TOPICS BELOW. Check each of the red circles to see if you have a match. Kind of like a matching puzzle.
For example, if you see “Invalid active developer path (/Library/Developer/CommandLineTools)” in your error message, use the search tool in LoopDocs with “invalid active”. You will get a couple of links and one is the Command Line Tools fix for that error message. Click on the link and you’ll find the solution.
Specific Error Messages¶
Run Destination is Not Valid; Failed to Prepare the Device¶
Error Message:
The run destination for name’s phone is not valid for running the scheme “Loop (Workspace)”
Solution:
First make sure your Xcode version is new enough to work with your phone iOS version and make sure developer mode is turned on for iOS 16 or newer. If so, then try this procedure:
- Follow the link for the Unpair and Reboot procedure.
Package.resolved file corrupted or malformed¶
Error Message:
Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2
This error is new with Loop 3, which uses Package Dependencies.
There are 2 problems shown here
- The version of Xcode is out of date
- The graphic was acquired using a camera instead of a screenshot, and yes – that was a joke – using a camera does not cause a build error
Solution:
Update Xcode, which may require you to update macOS.
Couldn’t Get Revision for Package Dependency¶
Many Search 1.4.3 for this Error¶
This error is new with Loop 3, which uses Package Dependencies.
- If you notice a red x in Xcode (as circled in the graphic below)
- Click on the red x to show the error in the left pane
- Alternatively, you can click on the icon shown with the red square to see the same information
Error Message:
Text in error:
- Uncategorized
- Couldn’t get revision . . .
Solution:
Refer to the graphic below
- Click on the folder icon (indicated by red square)
- Hold down the Control-Key and click the
Package Dependencies
row to display the dropdown menu (shown in the inset) - Select Reset Package Caches from the dropdown menu and wait for Xcode to finish the reset process
- Once the package reset completes (updates in upper right of xcode will stop or say indexing), the red x should vanish
- You can start the build as soon as the Indexing message appears
Unable To Read Included File¶
This error has been seen with Loop 3. The permanent xcconfig file, created by the build script and used to sign targets, is written to a folder where the user does not have read permission.
Error Message:
Text in error:
- unable to read included file
path inserted here
Solution:
No need to quit Xcode. If your build script terminal is still open, use it. Otherwise, open a new terminal window.
Copy the lines below that start with ls -l
by hovering the mouse near the right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
Copy and Paste to add read permissions to xcconfig file
ls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig
chmod +r ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig
ls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig
Paste the lines into the terminal. The response to the first line will be something like this:
--w------- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig
There will be no response after the second line – although if an error is reported, please grab a screen shot.
The response to the last line will be something like this:
-rw-r--r-- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig
The addition of r
where there used to be -
on the left side, means you now have permission to read that file.
Final step is to return to Xcode and clean the build folder. Otherwise Xcode remembers it could not read the file and it won’t try again.
- From the
Product
menu (of Xcode), selectClean Build Folder
- Press the Build Button (play icon)
Cycle Dependency¶
This error is new with Xcode 13.3 (late Sep 2021) which has a new requirement
- For those who care: the new requirement is that for a certain type of instruction file, the line with the
Headers
keyword must be located before the line with theSources
keyword - There used to be many repositories that did not have lines in that order
- If you are seeing this error, you are building with an older copy and should consider updating
Error Message:
Text in error:
-
Left window (the exact target names are not important):
- Cycle in dependencies between targets . . .
-
Middle window:
- Target build order preserved because “Build Order” is set to “Manual Order” in the scheme settings
Solution:
No need to quit Xcode – follow these steps using the Xcode Menu bar. (It’s possible that only Step 1 is required, but sometimes all steps are needed.)
- From the
Product
menu (of Xcode), selectClean Build Folder
- From the
File
menu, selectClose Workspace
- From the
File
menu, selectOpen Recent
and choose the top line - Press the Build Button (play icon)
Entitlements Error¶
Error Message:
Text in error message can be either of these:
Entitlements file “WatchApp Extension.entitlements” was modified . . .
or
Entitlements file “Loop.entitlements” was modified . . .
Solution:
No need to quit Xcode – follow these numbered steps as indicated in the graphic below.
- Click on the Loop icon under PROJECT
- From the
Product
menu (of Xcode), selectClean Build Folder
- Press the Build Button (play icon)
It turns out that
- You can start building before indexing completes – just make sure it has started
- The behavior causing this in Xcode has been reported to Apple
CompileAssetCatalog Error¶
This error is found when there is a space embedded in the path name to your LoopWorspace folder. The good news is that LoopWorkspace seems to be able to build from an iCloud or Dropbox drive.
Text in error message:
Command CompileAssetCatalog failed with a nonzero exit code. . .
Solution:
This is very similar to the steps for the WatchApp Entitlements Error but you need to repeat it for 2 targets: Loop
and WatchApp
– the graphic below matches the step numbers in the list.
- Click on
Loop
folder - Click on
Loop
target - Click on the
General
tab - Click on the
App Icons Source
dropdown menu - Click on the item already selected (the line will change from red to blank)
- Repeat the
App Icons Source
dropdown menu selection for theWatchApp
target - (Optional) Clear the Build Error (Menu at top of Xcode: Select Product->Clean Build Folder)
- Press build
Carthage Error¶
For older builds only. With Loop 3.2.0 and newer, the default selection is already LoopWorkspace.
You should not see carthage errors, but if you do, you probably did not select Loop (Workspace) at the top of the Xcode window. Review the graphic from the Prepare to Build Instructions.
Or maybe you are trying to build using an old download; some older versions did require carthage. Best practice is to download new code.
Error Message:
Wrong Version of Carthage Error
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin , -extract , -remove , -replace , -verify_arch … , -archs, -info, or -detailed_info must be specified.
Solution: Download fresh code with Build Select Script.
Could Not Locate Device Support Files¶
Error Message: “Could not locate device support files.” That message is telling you that your iOS on the Loop phone requires you to get a newer version of Xcode to be able to build Loop onto that phone.
Solution: Update your Xcode version; this may also require a macOS update. Please review the phone iOS driven requirements for Xcode and macOS.
No Such Module ‘LoopKit’ or Similar Message¶
Error Message: If you see a Cartfile failure and several other red errors (in particular saying there is “no such module ‘LoopKit'”).
Solution: Read the Carthage Error section above.
Developer License Update (PLA Update)¶
Error message: “The Apple Developer Program License Agreement has been updated, In order to access certain membership resources, you must accept the latest license agreement”. Or you may see “Unable to process request – PLA Update available. You currently don’t have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.”
Solution: You’ll need to log onto your developer account at developer.apple.com and accept the latest license agreement.
Could Not Get a Container Directory URL¶
Error message: “Could not get a container directory URL. Please ensure App Groups are set up correctly in entitlements.”
Solution: To resolve this error, you will need to click on the Loop target’s signing area and then the plus-sign in the App Groups area under the signing. Copy and paste the bundle indentifier into the new container that starts with group.
and then add Group
to the end of the name. Click OK to save. Note, the line will start with lower case group.
followed by your bundle identifier and an upper case Group
added to the end of the bundle identifier.
The final App Group should now have a blue check box, the name should start with group
and end with LoopGroup
. See the screenshot as an example. Click the build button after your App Group is setup similarly and you should be good.
Missing Command Line Tools¶
Error message: “Invalid active developer path (/Library/Developer/CommandLineTools)”
Solution: Go to your Xcode -> Preferences (or Settings) and under the Locations tab, select your Xcode version (the figure shows 14.0.1 – yours should match your Xcode version) in the dropdown menu for Command Line Tools.
Device Management Could Not Launch Loop¶
Error message: “Could not launch “Loop”. Verify the Developer App certificate for your account is trusted on your device. Open Settings and navigate to General -> Device Management, then select your Developer App certificate to trust it.”
New Solution First try the Unpair and Reboot process above. If that doesn’t work, then try the solution listed below.
Solution: If you get this message and are unable to find the Device Management option in your phone settings, then we need to do a little extra step to clear out some old info.
- Plug the phone into the computer and open Xcode
- Click the “Window” menu item in Xcode and then choose “Devices and Simulators”
- Right click your phone on the left and pick “Show Provisioning Profiles”
- Delete all of the items in the list that have Loop in the name
- Go to your four signing targets and change the signing team back to “None” for a quick bit, and then change back to your regular signing team name again.
- Rebuild Loop
That should clear the out, problematic profiles and allow a successful build.
If your problem persists after that, then you might need to do total reset of your phone to clear out the pesky problem. Before you do this, you may want to Post for Help to make sure it is really necessary:
- Wipe the iPhone clean and set it up as a new device
- FIRST – write down or screenshot all your settings
- Pod users – you will have to start a fresh pod after this
- If you want your old pod to continue giving you basal rate, don’t replace the pod before wiping your phone. Once the phone is reset and a new Loop app is added, you must start a new pod. The old pod should have the sound connection broken before being discarded because you won’t be able to deactivate the pod.
- Delete all certificates from your Developer account (you’ll need to login to your Developer account to do that)
- Delete your old Loop code download and get a new one.
- Rebuild Loop on the phone with the new download of Loop code.
- Start a new pod with the new Loop app on the reset phone.
Pending Certificate Request¶
Error message: “You already have a current iOS Development certificate or a pending certificate request.”
Solution: This error message has recently started to appear for some new Loop builders. To resolve the issue, please log in to your Developer account at developer.apple.com and then click on “Certificates, Identifiers & Profiles”. Under that screen, you will see “Development” under the “Certificates” section in the column on the left. You will need to click on the certificates, and choose “revoke” from the options that show after you click on the certificate. Confirm the warning message that will appear asking “Do you want to revoke the certificate?”
After you do that, return to Xcode and open up Xcode -> Preferences (or Settings) and choose the Accounts tab. Highlight your Apple ID and click on the minus sign to delete your Apple ID.
Re-enter your Apple ID (yes…add that account right back that you literally just deleted), return to your Loop’s target signing areas in Xcode and your error message should have resolved as a new certificate will have been issued and a provisioning profile should have been created automatically.
You can verify the iOS development certificates are working by clicking on “Manage Certificates” in Xcode -> Preferences (or Settings), Accounts tab and viewing the iOS Development Certificates. You should have one for your account that has a clean status similar to the screenshot below.
Command CodeSign Failed¶
Error message: “errSecInternalComponent, Command CodeSign failed with a nonzero exit code”
Solution: This error message is likely due to inadvertently saying “no” to allowing Keychain Access or changing your computer or AppleID password. Regardless, the solution is as follows:
- Close Xcode
- Open your Keychain Access application (found in Applications within the Utilities folder)
- In the upper left corner of keychain access, make sure you have the keychain
login
highlighted and then right-click the lock next to thelogin
. Click the lock closed, and then click the lock to open it again. You will be prompted for a password. Enter your computer admin password. Close Keychain Access app.
- Open your Loop project again in Xcode.
- In the main Xcode menu (grey menu bar at the very top of your Apple display area), select
Product
and then select the option forClean
. (Keyboard shortcut is Shift+Cmd+K) - Now try rebuilding your Loop app. If you ever get prompted again to allow Xcode access to Keychain, make sure to click on the option to Always Allow.
Unrecognized Arguments¶
Error message: “Unrecognized arguments: –cache-builds”
Solution: This is a homebrew / carthage error, so I don’t think you’ll see this. If you do, download a fresh copy of Loop code and try again. If it repeats, it is time to request assistance. Please read Posting for Help.
Abort with Payload¶
Error message: “Abort with payload” Your app will only open briefly with a white screen and then close, if you build with this error.
Solution: This error message is caused by having the Loop download folder in an iCloud mapped drive when doing the zip download. Move your Loop download folder back to the Downloads folder, then rebuild. LoopWorkspace builds with Xcode 13 appear to work fine with an iCloud drive. You may run into the spaces in your path name problem – which has a different solution.
Apple Watch Issues¶
Apple Watch: Loop App Not Appearing¶
Error: Apple watch app is not appearing.
Solution: This error usually appears because you have not updated the watchOS prior to building Loop, or you didn’t have your Apple watch paired at the time of building Loop.
Don’t forget to open the iPhone’s Watch app, select My Watch tab on the bottom left, scroll all the way down, and click Install
for the Loop app listed at the very bottom under “available apps”.
Apple Watch: Loop App Not Installing¶
Before trying this solution, see if the Unpair and Reboot procedure works.
Error: The Loop app appears on the list of apps available to install on the watch, but when you press “install”, and it goes through the animation of filling in the circle while it’s installing, but then at the end it just toggles back to saying “INSTALL”.
Solution: Plug your iPhone into the computer and start Xcode. On your watch, look for a prompt that says “Trust this computer”. Scroll down on the watch face and select the “Trust” button. In Xcode, go to the top menu bar and select “Clean Build Folder” from the Product menu option, and then rebuild your Loop app.
If the watch app still fails to install properly, the next section should work.
Apple Watch: Loop App Not Running on Watch¶
Error: Tapping the Loop app icon on the watch results in flash of the watch screen and then return to the Loop app icon or a brief display of the watch interface and then return to the Loop app icon.
Solution: Plug in your iPhone, with the watch already paired, into the computer and start Xcode with your current build folder. In Xcode, from the list of schemes where you normally choose Loop (Workspace) (with Loop 3.2.x and newer, LoopWorkspace is the default), choose the WatchApp scheme (near the bottom of the list) and then select your watch (not a simulator) from the device list, see the graphics below. Press the play button to build and deploy the WatchApp directly to your watch. It will launch correctly and will not crash when you subsequently launch it from the complication or your watch Home Screen..
Warning: Make sure your watchOS is up to date with respect to your phone iOS. If not, you may need to update to be successful. On pressing clicking build/play, some people report receiving an error stating “iPhone/Apple Watch are ineligible because the OS on the watch doesn’t support WatchKit App Products” or similar wording. This is a known issue with some Mac USB ports. Fixes in preference order are: 1) swap which USB port is in use; 2) unplug and replug the USB cable from both the iPhone and Mac; or 3) as a last resort, reboot the iPhone and Mac.
Don’t forget to select Loop(Workspace) after building to the watch before trying to build to a phone.
I’m trying to implement a simple Newton’s method iterative solver using Excel VB (I have never used VB.)
I keep getting the error loop without a Do
and I can’t figure out what I’m doing wrong here.
I’m trying to find the roots of the function z^3 - z^2 - (B^2 + B - A)z - A*B
called the compressibility factor.
My source MSN
Function zCalculation(ByVal temp As Double, ByVal press As Double) As Double
Dim tempCr As Double
Dim pressCr As Double
Dim A As Double
Dim B As Double
tempCr = temp / 238.5
pressCr = press / 547.424092
A = pressCr / tempCr
A = A / (9 * (2 ^ (1 / 3) - 1))
B = pressCr / tempCr
B = B * (2 ^ (1 / 3) - 1) / 3
Dim zNot As Double
Dim counter As Integer
counter = 0
zNot = 1#
Do
counter = counter + 1
zNot = zNot - (zNot ^ 3 - zNot ^ 2 - (B ^ 2 + B - A) * zNot - A * B) / (3 * zNot ^ 2 - 2 * zNot - (B ^ 2 + B - A))
If counter > 1000 Then
Exit Do
Loop Until eval(zNot, A, B) < 0.000001
zCalculation = zNot
End Function
break
Function eval(ByVal z As Double, ByVal A As Double, ByVal B As Double) As Double
eval = z ^ 3 - z ^ 2 - (B ^ 2 + B - A) * z - A * B
End Function
asked Dec 9, 2013 at 16:58
Felix CastorFelix Castor
1,5381 gold badge18 silver badges39 bronze badges
You need an:
End If
in your code.
answered Dec 9, 2013 at 17:04
Gary’s StudentGary’s Student
95.4k9 gold badges58 silver badges99 bronze badges
2
You can try:
Function zCalculation(ByVal temp As Double, ByVal press As Double) As Double
Dim tempCr As Double
Dim pressCr As Double
Dim A As Double
Dim B As Double
tempCr = temp / 238.5
pressCr = press / 0.546789
A = pressCr / tempCr
A = A / (9 * (2 ^ (1 / 3) - 1))
B = pressCr / tempCr
B = B * (2 ^ (1 / 3) - 1) / 3
Dim zNot As Double
Dim counter As Integer
counter = 0
zNot = 1#
Do
counter = counter + 1
zNot = zNot - (zNot ^ 3 + zNot ^ 2 - (B ^ 2 + B - A) * zNot - A * B) / (3 * zNot ^ 2 + 2 * zNot - (B ^ 2 + B - A))
If counter > 1000 Then
Exit Do
End if ' <--- Here
Loop Until eval(zNot, A, B) < 0.000001
zCalculation = zNot
End Function
answered Dec 9, 2013 at 17:06
1
Sub datacalculationsandformat()
Dim row As Integer
row = 2
Do While Cells(row, 2) <> ""
Cells(row, 3).Value = Cells(row, 2).Value * 0.3
Cells(row, 4).Value = Cells(row, 2) * 0.1
Cells(row, 5).Value = Cells(row, 2).Value + Cells(row, 3).Value + Cells(row, 4).Value
If Cells(row, 5).Value >= 8000 Then
Worksheets("Sheet1").Cells(row, 5).Font.Bold = True
row = row + 1
Loop
slavoo
5,76864 gold badges36 silver badges39 bronze badges
answered Sep 21, 2017 at 5:11