# error cs0103 help

**URL:** https://discussions.unity.com/t/error-cs0103-help/651029
**Category:** Scripting
**Tags:** Scripting
**Created:** [January 5, 2017, 4:39pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029 "2017-01-05T16:39:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shazz400](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@shazz400](https://discussions.unity.com/u/shazz400)
#### Post date: [January 5, 2017, 4:39pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029/1 "2017-01-05T16:39:37Z")

</div>

hi

im quite new to unity, and i am trying to build a mobile game. if someone can point me in the right direction i would really appreciate it. i am getting error CS0103: The name `pos’ does not exist in the current context. this is for “Stop”, “moveright”,“moveleft”,“pos” and so on. as im fairly new to unity and c# could you explain why these errors are occurring and how i can resolve this. the code i am using is below:

using UnityEngine;  
using System.Collections;

public class CubeControl : MonoBehaviour {

void Update() {  
float x = Input.GetAxis (“Horizontal”);  
if (x == 0) {  
Stop ();  
} else if (x \> 0) {  
MoveRight ();  
} else if (x \< 0) {  
MoveLeft ();  
}  
CubeControl = transform.position; //left//right  
CubeControl.x = Mathf.Clamp (CubeControl.x, “yourboundryminto”, “Yourboundrymax”);  
transform.position = CubeControl;  
}  
}

---

<div class="post-metadata">

### Author: ![DroidifyDevs](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/droidifydevs/32/340472_2.png) [@DroidifyDevs](https://discussions.unity.com/u/DroidifyDevs)
#### Post date: [January 5, 2017, 4:48pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029/2 "2017-01-05T16:48:17Z")

</div>

Please insert code properly: [https://forum.unity3d.com/threads/using-code-tags-properly.134625/](https://forum.unity3d.com/threads/using-code-tags-properly.134625/)

You’re trying to run a method MoveRight, but you haven’t specified what it is.

For example:

```csharp
void Start()
{
    SpamTheConsole(); //on start, run this function
}

//declare what you want to do!
void SpamTheConsole()
{
    Debug.Log("Your console has just been spammed!"); //do something
}

```

---

<div class="post-metadata">

### Author: ![shazz400](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@shazz400](https://discussions.unity.com/u/shazz400)
#### Post date: [January 5, 2017, 4:55pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029/3 "2017-01-05T16:55:24Z")

</div>

ok, cheers so how do i go about specifying it?

basically i have a gameobject named “block” with two long cubes next to each other with a gap between them. now when a user touches the screen and drags left or right the block also moves in that direction. now i am trying to setup a boundary so they can go up to a certain amount in the left or right direction. however how can i code this?

if you could explain it to me it would be great.

thanks

---

<div class="post-metadata">

### Author: ![KelsoMRK](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kelsomrk/32/205687_2.png) [@KelsoMRK](https://discussions.unity.com/u/KelsoMRK)
#### Post date: [January 5, 2017, 5:03pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029/4 "2017-01-05T17:03:22Z")

</div>

You’ve got a ton of problems in that snippet. Frankly, I’d suggest getting a better grip on the C# language and programming in general before trying to tackle game creation. When you’re ready for the latter - start here: [Learn](https://unity3d.com/learn)

---

<div class="post-metadata">

### Author: ![shazz400](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@shazz400](https://discussions.unity.com/u/shazz400)
#### Post date: [January 8, 2017, 10:01pm UTC](https://discussions.unity.com/t/error-cs0103-help/651029/5 "2017-01-08T22:01:13Z")

</div>

right just to update everyone i have solved it, works perfectly now. unfortunately that code above was no good, rewrote it and got it working. happy days
