New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script error (TweakScale): OnDestroy() can not take parameters. #124
Comments
KSP-hanglel.zip |
Weird! Obviously, OnDestroy doesn't takes any parameter (assuming we are taking Unity, of course!): https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDestroy.html A quick look on the KSP API also didn't revealed any OnDestroy with parameters: https://kerbalspaceprogram.com/api/class_game_events.html And none of my logs have this entry neither (and I have tons of test beds here). You log tells me that this weirdness happened immediately after the first Compiling Part, so AirplanePlus probably is just the messenger, not the culprit. But I installed it anyway on my 1.9.1 test bed to see what I get. I will come back after firing it up. |
Oh, well... It's something on AirplanePlus for sure. Now I have it too! :)
BUT AirplanePlus's
So AirplanePlus is, indeed, only a messenger. But I'm completely at lost on the issue. I removed everything from the test bed except ModuleManager, AirplanePlus and TweakScale - and yet, I have that message above. And, nope, Module Manager is not a suspect. I'm not using the same MM as you, and I know most of that code pretty well, and I can say for sure that at least the code I'm running is not calling any OnDestroy (with or without arguments). And I reproduced the problem on it nevertheless. Interesting. |
Curiously... On KSP 1.10, I got the message on another part: `` [ERR 01:31:55.620] ADDON BINDER: Cannot resolve assembly: TestFlightCore, Culture=neutral, PublicKeyToken=null
|
AirplanePlus is not needed! I just reproduced the behaviour on KSP 1.8.1 without it!
Mostly interesting... |
Hey... This happened too on KSP 1.7.3 (with AirplanePlus). What changes is when it happens, aparently...
|
What was the mod list for your stripped-down test on v1.10? 1.91? 1.8? |
And it happened again on 1.4.1 (without AirplanePlus).
|
|
Most interesting yet... I got it on KSP 1.3.1...
|
Surprisingly... I installed TS 2.3.7 on the 1.3.1 test bed, and the message did show up. Going up to 1.4.1 again using it. |
Yep... TS 2.3.7 on KSP 1.4.1 didn't triggered the OnDestroy ERR neither.
|
My 1.9.1-TEST is clean.
EDIT: HangOn. I had FS installed too. |
RRRIGHT... I installed TweakScale Beta compiled on debug mode on KSP 1.4.1 (the oldest I support by now, and since it also triggered the problem...). And I got this:
I don't have the faintest idea why in hell the OnDestroy (with parameters!!!) would be called even before the OnAwake method of TweakScale. Pretty weird. I'm coding some tests and will publish my findings in an hour... |
I AM A FSCKING IDIOT Found this on my code:
Ok, coding late night without proper sleep time can bite your on the SAS. Twice, as I missed an obvious error like this one. :P I will compile this, issue a new 2.4.3 version (damn it!) and will get some more sleep. :D |
OOOhhh man. Please get some rest. You need to take care of yourself before you take care of us. |
The funny part - besides issuing the error, Unity ended up calling the method - otherwise the Exceptions on the This is what I hate on Unity. I don't mind making mistakes, I mind not fixing them. This kind of error should be a "fatal" one - what Unity shoved on my (unholy) argument list? NULLs? But the argument is not nullable... Whatever. :) Release time and the bed again. :) |
Fixed on commit 715d0b9 |
I'm putting this here because it cites TS and TS-APP is just a config AddOn.
It's the only one of it's kind.
[LOG 14:27:46.964] PartLoader: Compiling Part 'AirplanePlus/Parts/Aero/anglewings/hanglel/hanglel'
[LOG 14:27:47.001] EffectList: Created 18 effect types
[ERR 14:27:47.042] Script error (TweakScale): OnDestroy() can not take parameters.
[LOG 14:27:47.101] PartLoader: Part 'AirplanePlus/Parts/Aero/anglewings/hanglel/hanglel' has no database record. Creating.
[LOG 14:27:47.109] DragCubeSystem: Creating drag cubes for part 'hanglel'
[LOG 14:27:47.148] PartLoader: Compiling Part 'AirplanePlus/Parts/Aero/anglewings/hangles/hangles'
[LOG 14:27:47.167] PartLoader: Part 'AirplanePlus/Parts/Aero/anglewings/hangles/hangles' has no database record. Creating.
[LOG 14:27:47.172] DragCubeSystem: Creating drag cubes for part 'hangles'
KSP.log
The text was updated successfully, but these errors were encountered: