Adding compatibility with the 3.7.0 API for ScriptHookDotNet#44
Open
MaelProgramming wants to merge 1 commit into
Open
Adding compatibility with the 3.7.0 API for ScriptHookDotNet#44MaelProgramming wants to merge 1 commit into
MaelProgramming wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR provides the necessary fixes to ensure compatibility with the latest ScriptHookVDotNet builds (API v3.7.0+). The previous version was using deprecated methods and types that caused TypeInitializationException and script crashes upon initialization in current GTA V environments.
Key Changes
Notification System Refactor: Migrated from
Notification.ShowtoNotification.PostTicker. Updated the return type handling from int toGTA.UI.FeedPostto match the new API requirements.Hash Generation Update: Replaced the obsolete
Game.GenerateHashwithStringHash.AtStringHash. This ensures correct hashing for phone components and UI elements using UTF-16 encoding.Strict Typing for Hashes: Migrated hash variables from
inttouint. Added explicit casts where necessary to resolve CS0266 "Cannot implicitly convert type 'uint' to 'int'" errors.Scaleform Loading Fix: Replaced the deprecated
new Scaleform()constructor with the asynchronousScaleform.RequestMovie()method. This prevents main-thread blocking and improves overall script stability during phone initialization.Verification
Successfully compiled using Visual Studio targeting SHVDN v3.7.0-nightly.133.
Verified in-game: The iFruit phone initializes correctly, contacts are functional, and the previous Unhandled exception notifications are resolved.