in Education by
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 days ago. Improve this question I am trying to make a game and this error keeps coming up, I think it is for misspelling but I am pretty sure that I did not misspell anything. But with that said I may have misspelled something and didn't see it so here is my code.The Error is Syntax error expected ',' using System.Collections; using System.Collections.Generic; using UnityEngine; public class Spawner : MonoBehaviour { public GameObject prefab; public int objectCount; public float spacing; public GameObject prefab2; public float Height; void Start() { var position = new Vector3(); for (int i = 0; i < objectCount; i++) { Instantiate(prefab, position, (0, Random.Range(-Height, Height), 0) Quaternion.identity); position.x += spacing; } } } JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You are missing a comma in Instantiate Your code: Instantiate(prefab, position, (0, Random.Range(-Height, Height), 0) Quaternion.identity); Fixed code; Instantiate(prefab, position, (0, Random.Range(-Height, Height), 0), Quaternion.identity);

Related questions

0 votes
    This is my code it's just starting the scan but it is not completing ,where is the error in it. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    I am trying to implement the Hateoas using spring boot. In my UserController class i have used the below ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    Here's the code: ''' file_path = (r'C:\Users\Luka\Desktop\Pyhton exercises\pi_digits.txt') with open( ... file_object: print(line) Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    If I have a view in SQL which contains various computed columns, some of which could be very expensive, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Heyy mates..Am an icse student can anyone tell me any importance for java please its urgent I have my exam ... please for icse java. Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    I am a number I am not an odd number I am higher than 90 I am not higher than 100 If you subtract me from 100, you get nothing. What number am I?...
asked Feb 13, 2021 in Education by JackTerrance
0 votes
    i am in hurry , i want to sleep early; but i have a test for tomorrow, i have not study what can ido Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    I'm trying to make sure that all my threads of Class A have finished before notify is called. At ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    Materialised views make sure that (a) View definition is kept stable (b) View definition is kept up-to ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Can we make changes on the repo and how we can make sure that the same has been merged into the working copy?...
asked Feb 18, 2021 in Technology by JackTerrance
0 votes
    In the Unity learn section - survival shooter, I am getting an error shows the following error Type " ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    In the Unity learn section - survival shooter, I am getting an error shows the following error Type " ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    I am trying to consume this API for dart using Flutter: https://pixcut.wondershare.com/api.html. My ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    Solve the Riddle :: Three men were on a boat that was stuck one mile from the shore. One was afraid of Sharks. ... they reached the shore without any problems. How did they do it?...
asked Feb 11, 2021 in Education by JackTerrance
0 votes
    Fill in the blanks. (i) Probability of an impossible event = . (ii) Probability of a sure event = .. (iii) Let E ... ≤ P (E) ≤ . Select the correct answer from above options...
asked Nov 23, 2021 in Education by JackTerrance
...