What does that mean? "BCW0008: WARNING: Duplicate namespace: 'UnityEngine'"

That is my conde… What is wrong?

import UnityEngine;

import System;

class PlayerController extends MonoBehaviour

{

var speed = 800.0;
	
	function FixedUpdate() {
		var moveHorizontal : float = Input.GetAxis ("Horizontal");
		var moveVertical : float = Input.GetAxis ("Vertical");
		
		var movement = Vector3(moveHorizontal, 0.0, moveVertical);
		
		rigidbody.AddForce(movement * speed * Time.deltaTime);
	}
}

It gives me that Warning “BCW0008: WARNING: Duplicate namespace: ‘UnityEngine’” and i cant move my player.

By default using UnityEngine(c#) or import UnityEngine(unityscript) and System.Collection.Generic are automagically added to the top of the script but you don’t see it. So yes, it is duplicated since you explicitly added them. Go ahead and remove your import for UnityEngine.

Are you trying to mix Unity Java and C#?

You can’t mix Java and C#

import UnityEngine; (Wrong)

import System; (Wrong)

class PlayerController extends MonoBehaviour (Wrong)

var speed = 800.0; (Wrong)

function FixedUpdate (Wrong, this is Java)

I fixed your code, it’s in C#

//Make sure you Freeze the X and Z Rotations on the Rigidbody!
//Make sure your script is also called "PlayerController"!

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour 
{
   
	public float speed = 800f;
	
		
	void FixedUpdate() 
	{
	
	float moveVertical  = Input.GetAxis("Vertical");
	float moveHorizontal = Input.GetAxis("Horizontal");
	Vector3 movement = new Vector3 (moveHorizontal, 0f, moveVertical);	
	rigidbody.AddForce(movement * speed * Time.deltaTime);
	
	}

}

Your code in Java

#pragma strict

var speed = 800.0;

function FixedUpdate() 
{
	var moveHorizontal : float = Input.GetAxis ("Horizontal");
	var moveVertical : float = Input.GetAxis ("Vertical");
	
	var movement = Vector3(moveHorizontal, 0.0, moveVertical);
	
	rigidbody.AddForce(movement * speed * Time.deltaTime);
}

Hope this help