Fixed issue where the custom logo wasnt showing in the game#15
Open
jlcd wants to merge 1 commit intoArrow-kb:mainfrom
Open
Fixed issue where the custom logo wasnt showing in the game#15jlcd wants to merge 1 commit intoArrow-kb:mainfrom
jlcd wants to merge 1 commit intoArrow-kb:mainfrom
Conversation
|
this mod doest work wen i put mod on vehicle and buy nothing shows up on the vehicle |
Author
Use the .zip I added at the end of the first message: FS25_CustomLogos.zip |
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.
Problem
Custom logos were visible in the shop and could be positioned correctly, but disappeared when vehicles were purchased and spawned in the game world. The game logs showed two critical errors:
'getChildAt': Argument 1 has wrong type. Expected: Int. Actual: Nil'link': Argument 1 has wrong type. Expected: Int. Actual: NilRoot Cause Analysis
BuyVehicleData.lualine 108 incorrectly usedstreamWriteStream()instead ofstreamWriteString()for parent path dataVehicle.luaattempted to parse parent paths without proper validation, leading to nil values being passed togetChildAt()andlink()Changes Made
src/shop/BuyVehicleData.luastreamWriteStream(streamId, logo.parent or "0|")→streamWriteString(streamId, logo.parent or "0|")src/vehicles/Vehicle.luaEnhanced parent path parsing in
setCustomLogoData():tonumber()result validation before callinggetChildAt()Improved error handling:
Restructured control flow:
gotousageTesting
These changes resolve the nil reference errors and ensure custom logos properly transfer from shop configuration to spawned vehicles. The mod now handles edge cases gracefully and provides useful debug information when issues occur.
Files Changed
src/shop/BuyVehicleData.luasrc/vehicles/Vehicle.luaWorking example
(awful placement, but, you can get the idea lol)

Ready to be used mod .zip:
FS25_CustomLogos.zip