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

Why isn't the best overload method not compatible with the arguments list?

$
0
0
I know that this is a common question here, but I've looked everywhere and I cannot find a solution anywhere. The exact error message is "The best overload for the method 'SideWalls.ScoreSystem()' is not compatible with the argument list '(String)'." The Code for Sidewall.js is #pragma strict function OnTriggerEnter2D (HitInfo : Collider2D) { if (HitInfo.name == "Ball") { var wallName = transform.name; ScoreSystem (wallName); } } function ScoreSystem() { } and ScoreSystem.js is #pragma strict static var Player1Score : int = 0; static var Player2Score : int = 0; public var wallName : String; static function Score (wallName : String) { if (wallName == "rightWall") { Player1Score += 1; } else { Player2Score += 1; } Debug.Log("Player 1: " + Player1Score); Debug.Log("Player 2: " + Player2Score); }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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