Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
There is a script I have been trying to run and the error it produces is
Attempt to execute SCRIPT Master_nusery_algorithm as a function
Any ideas with how I can solve this.
Here is a copy of the script
mangnursery = mangrovenurseries(map,mangrovefringe,40,20,500,830);
You need to have a proper function definition at the top of the file. This is a good readme: http://www.mathworks.com/help/matlab/matlab_prog/scripts-and-functions.html
Specifically, try something like this at the top of your mangrovenurseries function:
function mangnursery = mangrovenurseries(map,mangrovefringe,param1, param2, param3, param4)
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I'm building a class, and, when defining one of the functions, I get the error "Use of extraneous '&'". I don't know what it means, and I can't tell what I'm doing wrong.
I'm using Xcode 10.1. I'm trying to update a dictionary (named numOrders) contained in a Struct (named bidBook) by using the notation bidBook.numOrders[order.price] += 1 (where order.price is a variable contained in another Struct).
Lines 71, 72 and 87, 88 in main.swift produce the error.
The code can be found at https://github.com/cgit2017/Thesis in Thesis/main.swift.
I am not sure why that error happens, but for me it disappears when I change the lines to
bidBook.numOrders[order.price]! += 1
bidBook.priceSize[order.price]! += order.quantity
EDIT: Previously I assumed that it was due to bidBook.numOrders[order.price] returning an optional. This is not the issue since it works fine in other lines. Nevertheless the approach above works for me.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have different callbacks in an Matlab App Designer App. In my case several buttons. I need to use the same variables for that.
I only get an error when using a variable I created in one Callback in another...
I think I got your problem.
The easiest way is in beginning to create a new property (red button on the top left in EDITOR) and use it as a variable throughout the code.
Be careful to use app.variablename to address the variable.
If your code is already finished and you just discovered that error, you can set properties for only the variables you need to exchange and then get them like this:
set property:
properties (Access = private)
varone %first variable
vartwo % second variable
...
end
get Data for Exchange:
varone = app.varone; %(now you can use varone instead of app.varone)
make it public again at the end of your callback:
app.varone = varone;
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am building a example project with sections using a TableView with this video:
https://www.youtube.com/watch?v=zFMSovtqqUc
When this boy explain exactly at 2 minutes and 55 seconds a list of the variables created in the struct should appear in the list, but it does not.
Can someone help me to understand what I am doing wrong?
Attached a print screen of my Xcode displaying the values where the list of value explained in the video should appear.
I am just a beginner following some video to learn to code.
Thank you very much for your time, I really appreciate it!
The same it's happening to me, look
If for you it's a big problem you can put 2 parenthesis around the value you are creating
This seems to fix the problem.
Conventions
Sorry but I could not avoid this
Objects is a wrong name for a struct (intact struct values are NOT objects)
Implicit unwrapped optionals (like the property of the struct into the example) are dangerous
Variable names should begin with a lowercase char
In Swift we don't put the name of the type of the variable inside the name of the variable.
The variables aren't recognised when there is a ] automatically provided when you type in [ like this:
If you delete the ] as soon as it appears when you type in [, the error is fixed, like so:
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I've been trying to install this, I installed go, and also git, but when I follow the instructions to write:
go get github.com/anaminus/rbxplugin
go install github.com/anaminus/rbxplugin
into CMD I just get errors.
Is there any way someone can compile this for me into an exe or something so I can use it?
It wont compile with eclipse either. I have tried this on git, and also set my Gitroot and project location, it still wont install it.
This is the github project. I am trying to compile :
The errors you are seeing are because the code is broken.
src\github.com\anaminus\rbxplugin\rbxplugin.go:54: cannot use client (type *http.Client) as type *rbxweb.Client in argument to asset.Upload
src\github.com\anaminus\rbxplugin\rbxplugin.go:54: assignment count mismatch: 3 = 2
src\github.com\anaminus\rbxplugin\rbxplugin.go:70: undefined: rbxweb.DoRawPost
src\github.com\anaminus\rbxplugin\rbxplugin.go:97: cannot use client (type *http.Client) as type *rbxweb.Client in argument to asset.Upload
src\github.com\anaminus\rbxplugin\rbxplugin.go:97: assignment count mismatch: 3 = 2
src\github.com\anaminus\rbxplugin\rbxplugin.go:111: undefined: rbxweb.Login
You will either need to get the project owner to fix these compilation errors or fork the project and fix them yourself.
Not every project on github is guaranteed to actually work.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I copied code from here but I'm getting an error when trying to run the code.
The problem would be in:
Public NextItem As New queueItem
and the error message is:
user-defined type not defined
Is my VBA version not right to do this or am I doing something wrong?
You probably mean this link? The one you provided has the alternative implementation (with arrays, not with references).
I got it to work for me. Steps:
Right click on the VBA project file name, and go to Insert-> Class Module:
Click F4. The Properties window appears. Then go to the class Name and change it to Queue:
Copy and Paste the Queue Class code you found at the web site. Repeat the previous and this step for the QueueItem class (i.e., insert a Class Module, name it QueueItem and copy the code inside that class module).
This time, insert a Module using the same process (not a Class Module, but rather a simple Module). You do not need to give your module a name, Module1 will be OK.
Copy the Sub TestQueue() inside the module and run it. It should work. If you use Option Explicit on your module, you will get an error that element is undefined. So we need to define it: Dim element as Variant, under the first few Dim statements of the subroutine. Then it should run.
The above worked for me, let me know if I can be more precise, or send the file to you.