- Home /
How can I find the line number in flash build error (simple)?
I'm using the 3.5 flash demo to see if I should buy the flash plugin for Unity 4. I get errors like:` Copy\Temp\StagingArea\Data\ConvertedDotNetCode\global\WeaponSelectScreen.as(608): col: 242 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.`
I need help finding which line these errors refer to. I started out assuming that the number in brackets (608) referred to the line number and the col:242 referred to the column. They are related somehow, but don't correspond to the line number in monodevelope at all.
How do I use those numbers to figure out where the error is?
Answer by Philipp · Mar 14, 2013 at 10:10 PM
Those line numbers are in the ActionScript code compiled from your scripts, not in your C#/JS source. You'll find them by going into the Temp folder in your project's root directory and then following the path given (`Temp\StagingArea\Data\ConvertedDotNetCode\global\WeaponSelectScreen.as`).
Use a text editor to open the .as file. Figuring out what part of your code caused the error takes a bit of practice (especially if you use stuff like co-routines), but after a while you'll develop an eye for translating back and forth.
Looks like it does not want me to change any of the values of a hinge joint in code:
newWeapon.transform.Find("WeaponBody").GetComponent(HingeJoint).connectedBody=location.transform.parent.rigidbody;
Becomes this with an error:
(this.WeaponSelectScreen$newWeapon$.transform.Transform_Find_String("WeaponBody").Component_GetComponent_Type(HingeJoint.$Type) as HingeJoint).Joint_connectedBody_Rigidbody = ($array2.elements[$j] as GameObject).transform.parent.Component_rigidbody;
Reckon this is fixed in the Unity 4 version? Going to look for any workarounds.
I have no experience with joints, but I don't see anything obvious why it would fail at that point. Are there other errors?
In general, I wouldn't operate under the assumption that something missing in your version of the Flash exporter is fixed in the current version. That expectation has come back to bite us many times in the 9 months we've been working with the exporter. It's impressive that they've got it to work in the first place, but it still requires a lot of patience and workarounds.
Actually, messing with HingeJonts happens quite a lot in my code and give errors just about every time I try to change a value. Here is another example:
leftHandAttachPoint.GetComponentInChildren(HingeJoint).breakForce=0;
Becomes: (this.WeaponSelectScreen$leftHandAttachPoint$.GameObject_GetComponentInChildren_Type(HingeJoint.$Type) as HingeJoint).Joint_breakForce_Single = Number(0);
Here I'm just setting the break force.
$$anonymous$$aybe it is getting confused as far as the HingeJoint Type vs the specific instance of the HingeJoint? It's talking about adding to the class, and I am trying to modify just a value. HingeJoint is blue type in the Unity Compiler. I guess that means it is a built in type or something? That might be causing a problem when trying to translate the code.
All other errors are IO stuff for saving/loading that I expected to break anyway.
I'm gonna ask about this as a new question and link it here if it gets an answer.
Your answer
Follow this Question
Related Questions
Unity3d 3.5 Build to flash error dump debug 0 Answers
Distribute terrain in zones 3 Answers
Unfortunately, "GameName" has stopped. 0 Answers
Gradle build failed : "Could not get unknown property 'GradleVersion' " 1 Answer
764 Errors After adding admob 2 Answers