- Home /
Object2Terrain error/wont work.
I named a folder 'Editor' and added a script,naming it Object2Terrain,and when I paste the script of it in there,this comes up.
Assets/Editor/Object2Terrain.js(61,14): BCE0005: Unknown identifier: 'zCount'.
And theres no button in the Terrain menu,and I'm not good with Unityscript yet (im using Unityscript/Javascript) so I can't figure it out. How do I fix this?
You should post your script or at least the related part of it. What i can think of from just the message is: You're trying to use a variable called zCount but never declared it.
Well its the script on the wiki http://wiki.unity3d.com/index.php?title=Object2Terrain
I used it before but now it wont work.
There is this line in the script:
for (zCount = 0; zCount < resolutionZ; zCount++) {
which should be changed to
for (var zCount = 0; zCount < resolutionZ; zCount++) {
I think
Okay,i'll try that soon,i'll get back to you if it works or not.
Sorry it took me so long to get back to you,I'm just able to test it now,i'll re-copy everything,double checking,and see if it works... soo give me a sec..Its working now...$$anonymous$$ost likely I copied something I shouldn't have or forgot something,my bad for pasting such a simple mistake :/ Thank you though.
Answer by ExTheSea · Jun 02, 2013 at 10:23 AM
Hm i just tried it out myself and it worked even without the change i suggested. Are you sure you copied the entire code?
Your answer
Follow this Question
Related Questions
Custom tab of Terrain inspector, is it possible? 0 Answers
Player damage stops working over time 0 Answers
Unity Terrain button wont show up. 1 Answer
editor script makes editor crash 1 Answer
Android build fatal error 0 Answers