;

PDA

Click to See Complete Forum and Search --> : Error 1067 [AS3] Please help!!


ksaul
11-05-2008, 12:43 AM
var pointsWin:int = 1;
var pointsLose:int = -1;
var gameScore:int;

gameScore = 0;

showScore_tb.text = gameScore;


I keep getting this error

1067: Implicit coercion of a value of type int to an unrelated type String.
showScore_tb.text = gameScore;

neznein9
11-05-2008, 01:22 AM
You need to convert the number (gameScore) into a string before putting it into the text field...use one of these:

showScore_tb.text = String(gameScore);
showScore_tb.text = "" + gameScore;
showScore_tb.text = gameScore as String;

ksaul
11-05-2008, 10:49 PM
i always make stupid mistakes, thank you!!