Bob_74 Posted March 12, 2018 Share Posted March 12, 2018 (edited) I am unable to access some NativeUI functionalities.If I try to use UIMenu.SetKey() or UIMenu.SetBannerType(UIResRectangle), I get an error from Visual Studio (2017): UIMenu menu = new UIMenu("My title", "My subtitle");UIResRectangle rect = new UIResRectangle();menu.SetBannerType(rect); // Error heremenu.SetKey(UIMenu.MenuControls.Up, Keys.NumPad8); // Error here CS0012: The type 'UIRectangle' is defined in an assembly that is not referenced. You must add a reference to assembly 'ScriptHookVDotNet, Version=2.9.2.0, Culture=neutral, PublicKeyToken=null'.CS0012: The type 'Control' is defined in an assembly that is not referenced. You must add a reference to assembly 'ScriptHookVDotNet, Version=2.9.2.0, Culture=neutral, PublicKeyToken=null'. ScriptHookVDotNet v2.10.5 and NativeUI v1.7 are referenced to my project and I can use barely everything from these.Does NativeUI 1.7 uses older elements that were removed after ScriptHookDotNet v2.9.2?If so, how can I use/convert these element with the current ScriptHookVDotNet version? Edited March 12, 2018 by Bob_74 Link to comment Share on other sites More sharing options...
Bob_74 Posted March 21, 2018 Author Share Posted March 21, 2018 Nobody had this kind of issue? Link to comment Share on other sites More sharing options...
NModds Posted March 21, 2018 Share Posted March 21, 2018 (edited) Nobody had this kind of issue? I tried doing what you did, but visual studio didn't give any errors. I used his source code and referenced the new scripthookvdotnet, there were a lot of obsolete functions but the compiler still built it. Not sure if you looked at the source code but here it is, https://github.com/Guad/NativeUI/archive/1.7.zip Edited March 21, 2018 by nm710 Bob_74 1 Link to comment Share on other sites More sharing options...
Bob_74 Posted March 21, 2018 Author Share Posted March 21, 2018 (edited) Actually I'm using the released DLL for NativeUI and ScriptHookVDotNet2. Otherwise I would have to redistribute them to allow players to install my mods But afaik, NativeUI won't release a new version until ScriptHookVDotNet3 is out. Edited March 21, 2018 by Bob_74 Link to comment Share on other sites More sharing options...
NModds Posted March 21, 2018 Share Posted March 21, 2018 yeah that makes sense. I'm also not sure if he allows redistribution. Link to comment Share on other sites More sharing options...
aimless Posted March 21, 2018 Share Posted March 21, 2018 Im having the same problem ever since 2.10.0 when the name was changed to ScriptHookVDotNet2. For now i reference ScriptHookVDotNet 2.9.6 when compiling and run with 2.10.5. I dont get the updated elums and stuff but it works. Bob_74 1 Link to comment Share on other sites More sharing options...
Bob_74 Posted March 21, 2018 Author Share Posted March 21, 2018 Im having the same problem ever since 2.10.0 when the name was changed to ScriptHookVDotNet2. For now i reference ScriptHookVDotNet 2.9.6 when compiling and run with 2.10.5. I dont get the updated elums and stuff but it works. That's a bit disappointing having to use an older version of ScriptHookVDotNet... I'm wondering if I should compile NativeUI and redistribute it like I'm Not Mental has done. But players would then have 3 or more NativeUI instances running under a different name, it would be a real mess. Link to comment Share on other sites More sharing options...
OfficerJohnson Posted April 1, 2018 Share Posted April 1, 2018 Im having the same problem ever since 2.10.0 when the name was changed to ScriptHookVDotNet2. For now i reference ScriptHookVDotNet 2.9.6 when compiling and run with 2.10.5. I dont get the updated elums and stuff but it works. Sorry to bring up an old topic but this is actually something I've run into a few times myself, especially when viewing source code. Can someone briefly explain why we get this error and what I must do to fix it? Still a beginner but do understand how to add references to VS. Link to comment Share on other sites More sharing options...
Bob_74 Posted April 1, 2018 Author Share Posted April 1, 2018 (edited) Im having the same problem ever since 2.10.0 when the name was changed to ScriptHookVDotNet2. For now i reference ScriptHookVDotNet 2.9.6 when compiling and run with 2.10.5. I dont get the updated elums and stuff but it works. Sorry to bring up an old topic but this is actually something I've run into a few times myself, especially when viewing source code. Can someone briefly explain why we get this error and what I must do to fix it? Still a beginner but do understand how to add references to VS. We get this error because the mod was compiled using an older version of ScriptHookVDotNet. What @aimless does is referencing an older version of ScriptHookVDotNet in his VS project instead of the latest version. It is a bit risky since you may use old methods that aren't implemented anymore and it will cause a crash of your mod if the players use an up to date version of ScriptHookVDotNet. If you see this when reading mods source code, it should be fixable most of the time by using the new way to do the missing thing (but you will have to find out what is the new way by looking at Github history ie.). Edited April 1, 2018 by Bob_74 Link to comment Share on other sites More sharing options...
OfficerJohnson Posted April 1, 2018 Share Posted April 1, 2018 (edited) Im having the same problem ever since 2.10.0 when the name was changed to ScriptHookVDotNet2. For now i reference ScriptHookVDotNet 2.9.6 when compiling and run with 2.10.5. I dont get the updated elums and stuff but it works. Sorry to bring up an old topic but this is actually something I've run into a few times myself, especially when viewing source code. Can someone briefly explain why we get this error and what I must do to fix it? Still a beginner but do understand how to add references to VS. We get this error because the mod was compiled using an older version of ScriptHookVDotNet. What @aimless does is referencing an older version of ScriptHookVDotNet in his VS project instead of the latest version. It is a bit risky since you may use old methods that aren't implemented anymore and it will cause a crash of your mod if the players use an up to date version of ScriptHookVDotNet. If you see this when reading mods source code, it should be fixable most of the time by using the new way to do the missing thing (but you will have to find out what is the new way by looking at Github history ie.).In other words, it means I have to add the older reference or update it myself in the code using the newer SHV way, right? This would explain why some mods I have tried worked when I used an older version but crashed or broke when using a more updated one. Thank you. Edited April 1, 2018 by OfficerJohnson Link to comment Share on other sites More sharing options...
Bob_74 Posted April 1, 2018 Author Share Posted April 1, 2018 In other words, it means I have to add the older reference or update it myself in the code using the newer SHV way, right? This would explain why some mods I have tried worked when I used an older version but crashed or broke when using a more updated one. Thank you. Yep that's it Link to comment Share on other sites More sharing options...