- Home /
Question by
CallToAdventure · Apr 20, 2011 at 09:13 AM ·
convert
C# to JS small error
I am trying to convert a c# script to js and it gives me an error that doesn't make sense to me:
Vector2 bumpOffset = treadLeft.renderer.material.GetTextureOffset("_BumpMap");
this is the code; and this is the error:
";' expected. Insert a semicolon at the end.
Obviously the ";" is there so I should be doing something else but not sure what : )
Comment
Yep, maybe the problem is in an opening/closing 'bracket', I mean this '{}'
Best Answer
Answer by efge · Apr 20, 2011 at 12:30 PM
In JS it should look like this:
var bumpOffset : Vector2 = treadLeft.renderer.material.GetTextureOffset("_BumpMap");
Answer by StephenLTGAMES · Apr 20, 2011 at 12:37 PM
indeed i second the above.
So click the up arrow next to the post ("upvote"), and/or comment - don't post a new answer for this!
Your answer
Follow this Question
Related Questions
Converting C# to JS... 1 Answer
Converting Boo to C# 0 Answers
Trying to Convert this JS to C# 2 Answers
How can I disable controls? 1 Answer
Js to C# convert 1 Answer