Quantcast
Channel: Answers for "Faulty if statement"
Viewing all articles
Browse latest Browse all 4

Answer by maccabbe

$
0
0
The line if(Input.anyKey(KeyCode.LeftShift)) (Input.anyKey(KeyCode.RightShift)) { needs to be changed. Right now it reads as if(x)(y) which doesn't make sense. You need to remove the inner parethesis and replace them with a binary conjunction such as [and] (&&) or [or] (||), i.e. if(x and y) would be if(Input.anyKey(KeyCode.LeftShift) && Input.anyKey(KeyCode.RightShift)) { if(x or y) would be if(Input.anyKey(KeyCode.LeftShift) || Input.anyKey(KeyCode.RightShift)) {

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images