Reload Script Error

I Have an error with this reload script

var ClipBullets : int = 15;
var Clips : int = 10;
var reloadTime : float = 0.5;
var CurrentBullets : int = ClipBullets;

function reload(){	

WaitForSeconds(reloadTime);
CurrentBullets = ClipBullets;
Clips--;
	}

function Update(){

 if(CurrentBullets = 0;){

reload();
}

if(CurrentBullets < ClipBullets  Input.GetKeyDown(KeyCode.R)){

	reload();

	}

}

The Erros areExpecting: ) Found: =
Unexpected Token: Zero
Expecting: : Found: ;

The first two are for if(CurrentBullets = 0){
The last one is forreload();

if(CurrentBullets = 0;){

should be :
if(CurrentBullets = 0){ [/quote]

if ( CurrentBullets == 0 ) {

x = 0 is assignment, x == 0 checks whether x equals zero.

Thanks alot for that. I should have remembered that from my first days of coding in c++

Hmm…this kind of error is somehow lovable, since it is “easy” to debug (he tells you what he founds, and what he expected, so, you just need to look for syntax errors, or things you forget). :wink: