Sorry im such a noob. Please help.
private Rigidbody rb;
void Start()
{
rb = GetComponent()
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis(“Horizontal”);
float moveVertical = Input.GetAxis(“Vertical”);
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rb.AddForce(movement);
I only briefly glanced as ive seen far too many threads today without code tags used…
Perhaps the force being added isnt enough to move the rb?
Just a thought. Im tired. No code tags… tsk tsk.
Oh… you’re looking for an error? ( again… tired. Sleep time for me) Try the console. It will tell you. You didnt tell us the error the console printed out.
Could be the lack of that last }
Lol.
Homicide:
I only briefly glanced as ive seen far too many threads today without code tags used…
Perhaps the force being added isnt enough to move the rb?
Just a thought. Im tired. No code tags… tsk tsk.
Oh… you’re looking for an error? ( again… tired. Sleep time for me) Try the console. It will tell you. You didnt tell us the error the console printed out.
Error CS1002 CS1513 CS1513
Sorry i’m such a noob. This is literally my first script and I keep smashing my head against the wall
There would definitely be more info then that in console.
Go to windows / console menu.
What does it tell you…
Sorry, i literally barely looked at code, it seemed ok other then the missing } at the end.
But use the Insert / Code Tag option in forum post.
Oh. You are also missing a semi colon in Start ()
GetComponent();
Homicide:
There would definitely be more info then that in console.
Go to windows / console menu.
What does it tell you…
Sorry, i literally barely looked at code, it seemed ok other then the missing } at the end.
But use the Insert / Code Tag option in forum post.
your suggestion removed one of my errors
hmmm, when i click the window tab i’m not seeing a console menu(Microsoft visual studio)
insert code tag?
Thanks again for the assistance btw.
I meant in unity
Did you fix the semi colon error?
Code Tags are option found in forum post options…
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rb.AddForce(movement);
}
yes i did, it removed an error. Now there’s one left.
Okay so unity is saying four errors
editor layout can not be fully loaded
request error(unity editor)
request error(unity editor)
assets/scripts CS1525 unexpected symbol
Homicide:
Code Tags are option found in forum post options…
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rb.AddForce(movement);
}
I see… sorry for the noobness lol
Is your script really missing the last curly bracket? } lol.
Anyways sorry, just wiped. But now the codes a lil easier to decipher. Check out the poster options for next time.
Homicide:
Is your script really missing the last curly bracket? } lol.
Anyways sorry, just wiped. But now the codes a lil easier to decipher. Check out the poster options for next time.
whoa… that just fixed the problem… ive literally spent hours on this… i feel like an idiot… thanks for all your help man seriously
1 Like