Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Unable to use parameter in javascript.

$
0
0
Hi, I'm trying to make a script that send values from a javascript script to a C# script. My problem is that I can't get the functions that send the info to accept a parameter. Here is my script. #pragma strict import System.Collections.Generic; public var csScript : TankController; function Start () { csScript = this.GetComponent("TankController"); AddVector(); } public function AddVector (vctStr : String) { csScript.SendMessage ("AddVectorPoint",vctStr); } When I try to run the game I get this error: Assets/Scripts/ParseMessage.js(12,18): BCE0017: The best overload for the method 'ParseMessage.AddVector(String)' is not compatible with the argument list '()'. Thanks for your help.

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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