- Home /
Passing an Array
here's some evidence that I'm retarded: I cant seem to pass an array of strings to another function. I'm using Javascript (which I don't know well) and trying things like:
function setSelectedUnit (jims: Array){
}
its not working. please help
You haven't said what you're actually trying to do...the code you posted is fine as far as it goes, and will work. You should provide more detail about what's "not working".
oh my you're right, it is working now! I guess it was passing the array all along, something else must have been going wrong. but its working now, thanks anyway. man I feel dumb.
Hm, I'm wondering how questions which resolved themselves could be deleted, so they won't turn up as "unanswered"...
Answer by Jordan Miller 2 · Apr 29, 2010 at 01:51 PM
ID10T error.
this works just fine:
function setSelectedUnit (jims: Array) {
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612195055im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does this passed Array cause errors in a function? 2 Answers
Storing functions in a list/array? 1 Answer
passing a javascript array into a function sorts it? 1 Answer
Is there a more elegant way to get different values (types) from a function 0 Answers
have array target person of most priority/stick with top prior 0 Answers