Hi all, i’m just trying my unity training from walker studio, but i have some error here and i don’t understand it, because in the video i watch the source can work properly.
this is my error :
Assets/BasicScripting.js(275,19): BCE0051: Operator ‘+’ cannot be used with a left hand side of type ‘Object’ and a right hand side of type ‘Object’.
Assets/BasicScripting.js(276,23): BCE0051: Operator ‘<’ cannot be used with a left hand side of type ‘int’ and a right hand side of type ‘Object’.
my error at function Addition and function Counter.
this is my source :
function update(){
PrintToScreen(21);
Addition(2,4);
Counter(20);
}
function PrintToScreen (text) {
print(text);
}
function Addition (a,b) {
var c = a + b;
print(c);
}
function Counter (num) {
var x : int;
for(x = 0 ; x < num ; x++){
print(x);
}
}
Anyone can explain it to me please? ![]()
Thanks ![]()