Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

"';' expected. Insert a semicolon in the end" error

$
0
0
I'm a noob in scripts, and I'm getting this error on this script: function Update () { if(Input.GetMouseButtonDown(0)) { bDragging = true; oldPos = transform.position; panOrigin = Camera.main.ScreenToViewportPoint(Input.mousePosition); } if(Input.GetMouseButton(0)) { Vector3 //Unity says there should be an semicolon right here// pos = Camera.main.ScreenToViewportPoint(Input.mousePosition) - panOrigin; transform.position = oldPos + -pos * panSpeed; } if(Input.GetMouseButtonUp(0)) { bDragging = false; } } Unity is giving me this error, and as far as I know, that error shouldn't happen. Can someone help me?

Viewing all articles
Browse latest Browse all 7934


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>