qbcore-redm-framework / qbr-multicharacter

Multicharacter for RedM QBCore
GNU General Public License v3.0
2 stars 20 forks source link

Script error: Exec. of native 00..406b4b20 #10

Closed atarifeels closed 2 years ago

atarifeels commented 2 years ago

image Happens as soon as character is created in the customization menu

AndrewR3K commented 2 years ago

I am also running into this exact issue with my newly created RedM server.

Issue:

When I connect to the server and create a new Character, I get the below errors in the backend server logs. However I do not see any errors in the F8 menu, but I cannot move the newly created character or use any keys other than the F8 menu.

Error:

[script:qbr-multichar] > ref (@qbr-multicharacter/server/main.lua:115) [script:qbr-multichar] > Query.onResult (@oxmysql/dist/build.js:21711) [script:qbr-multichar] > <unknown> (@oxmysql/dist/build.js:11918) [script:qbr-multichar] > processTicksAndRejections (node:internal/process/task_queues:78) [ script:oxmysql] Uncaught Error: Error in nested ref call. [ script:oxmysql] citizen:/scripting/v8/main.js(85,12): [ script:oxmysql] citizen:/scripting/v8/main.js(23,12): __cfx_wrap_83 [ script:oxmysql] citizen:/scripting/v8/main.js(29,16): [ script:oxmysql] citizen:/scripting/v8/main.js(81,11): [ script:oxmysql] @oxmysql/dist/build.js(21711,7): [ script:oxmysql] @oxmysql/dist/build.js(11918,20): [ script:oxmysql] node:internal/process/task_queues(78,11): processTicksAndRejections [ script:oxmysql] [ script:oxmysql] Error: Error in nested ref call. [ script:qbr-core] [qbr-core:LOG] Testing Martial PLAYER SAVED! [ c-scripting-core] InvokeNative: execution failed: Argument at index 0 was null. [script:qbr-multichar] SCRIPT ERROR: Execution of native 00000000406b4b20 in script host failed: Argument at index 0 was null.

Thanks in advance for any help/advice!

AndrewR3K commented 2 years ago

Some more info from my little bit of digging around. (Sorry in advance for any lack of knowledge, super new here)

@qbr-multicharacter/server/main.lua:115

Looks like this is erroring out on the json.decode function of the object return from a query of the 'playerskins' table. Digging around my DB, I'm noticing that my playerskins table is empty, which would make sense as to why the json.decode might break.

I'm guessing wherever the player is being created, the skin (maybe outfit as well) is not being populated correctly into the DB.

Hopefully, this info helps out a bit.

atarifeels commented 2 years ago

Digging around my DB, I'm noticing that my playerskins table is empty, which would make sense as to why the json.decode might break.

I'm guessing wherever the player is being created, the skin (maybe outfit as well) is not being populated correctly into the DB.

Hopefully, this info helps out a bit.

Yes, that is where the problem ended. The problem started in creating the character, we couldn't make "skin/character visual" (where data are stored in playerskins as you mentioned correctly), because of the native problem I fixed in PR #11. Now it runs smoothly and we can create a skin for the player.

atarifeels commented 2 years ago

I closed this issue but forgot it would close PR as well, sorry for spam!