#h2h Racing Tablet

1 messages · Page 1 of 1 (latest)

muted scroll
#

I'm using a Qbox server and just installed the racing script that comes with the h2h. I invited some friends to test with me and i got this error in the server's console.
i installed it following the install instructions in the github.
do you guys have any clue about what's going on?

#

This error appears when i press the h2h invite button

viral rose
#

Do you have any other errors? These errors don't hint at to what is actually wrong at all sadly

muted scroll
#

no, just this message

it only happens when i do a h2h with someone, because when i try alone(i enabled the solo race) it works perfectly

#

this is how the script is installed

viral rose
#

And other features works as expected? You can create users, do races, see stuff in results?

muted scroll
viral rose
#

No the separate h2h is probably very outdated

muted scroll
#

i think it's better i disable the h2h until i find out how to fix it, i didn't see anyone with the same error, so i think it's the problem with my base or other script causing conflict

viral rose
#

Could you run the script with Debug set to true

#

and see if it prints anything before that error

muted scroll
#

are these the only debugs right?

viral rose
#

Yeah just set Config.Debug = true

muted scroll
#

[ script:cw-racingapp] opening ui
[ script:cw-racingapp] opening ui
[ script:cw-racingapp] [RADB] getRaceUserByName | racerName: carai
[ script:cw-racingapp] [RADB] getCryptoForRacer | racerName: carai
[ script:cw-racingapp] [RESDB] getTrackRaceStats | datespanDays: 100
[ script:cw-racingapp] [RESDB] getTrackRaceStats | returning cached result
[ script:cw-racingapp] [RESDB] getRacerHistory | racerName: nil
[ script:cw-racingapp] [RESDB] getTopRacerWinnersAndWinLoss | days: 100, amountOfRacers: 5, cacheKey: 100
[ script:cw-racingapp] [RESDB] getTopRacerWinnersAndWinLoss | returning cached result
[ script:cw-racingapp] [RADB] getActiveRacerName | citizenId: JO1WL87D
[ script:cw-racingapp] setting up JO1WL87D carai vec3(180.367554, -2978.035156, 5.330421) 0
[ script:cw-racingapp] Race Data: {
[ script:cw-racingapp] "finishCoords": {
[ script:cw-racingapp] "x": -769.5999755859375,
[ script:cw-racingapp] "y": -1113.18994140625,
[ script:cw-racingapp] "z": 10.03999996185302
[ script:cw-racingapp] },
[ script:cw-racingapp] "started": false,
[ script:cw-racingapp] "amount": 0,
[ script:cw-racingapp] "finished": false,
[ script:cw-racingapp] "raceId": "IR-9675",
[ script:cw-racingapp] "startCoords": {
[ script:cw-racingapp] "x": 180.3675537109375,
[ script:cw-racingapp] "y": -2978.03515625,
[ script:cw-racingapp] "z": 5.3304214477539
[ script:cw-racingapp] },
[ script:cw-racingapp] "racers": [
[ script:cw-racingapp] {
[ script:cw-racingapp] "racerName": "carai",
[ script:cw-racingapp] "source": 1,
[ script:cw-racingapp] "citizenId": "JO1WL87D"
[ script:cw-racingapp] }
[ script:cw-racingapp] ]
[ script:cw-racingapp] }
[ c-scripting-core] script error in native 000000002f7a49e6: Argument at index 1 was null.
[ script:cw-racingapp] SCRIPT ERROR: native 000000002f7a49e6: Argument at index 1 was null.
[ script:cw-racingapp] > new StackDumpError (D:\SERVIDOR\server\citizen/scripting/v8/main.js:416)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:436)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:97)
[ script:cw-racingapp] > Number.__cfx_wrap_42739 (D:\SERVIDOR\server\citizen/scripting/v8/main.js:24)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:30)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:94)
[ script:cw-racingapp] > rawQuery (@oxmysql/dist/build.js:26512)
[ script:cw-racingapp] > process.processTicksAndRejections (node:internal/process/task_queues:105)

#

this is the log when i open the tablet and press the h2h invite

#

crazy thing uh hahahahahaha

viral rose
#

And it works if you have ConfigH2H.SoloRace = true?

muted scroll
#

yeah, i'll enable with the log and see what it print

viral rose
#

Does the other player get the invite?

muted scroll
#

[ script:cw-racingapp] opening ui
[ script:cw-racingapp] opening ui
[ script:cw-racingapp] [RADB] getRaceUserByName | racerName: carai
[ script:cw-racingapp] [RADB] getCryptoForRacer | racerName: carai
[ script:cw-racingapp] [RESDB] getTrackRaceStats | datespanDays: 100
[ script:cw-racingapp] [RESDB] getTrackRaceStats | returning fresh result, count: 27
[ script:cw-racingapp] [RESDB] getRacerHistory | racerName: nil
[ script:cw-racingapp] [RESDB] getTopRacerWinnersAndWinLoss | days: 100, amountOfRacers: 5, cacheKey: 100
[ script:cw-racingapp] [RADB] getActiveRacerName | citizenId: JO1WL87D
[ script:cw-racingapp] setting up JO1WL87D carai vec3(180.367554, -2978.035156, 5.330421) 0
[ script:cw-racingapp] Race Data: {
[ script:cw-racingapp] "finishCoords": {
[ script:cw-racingapp] "x": 1202.530029296875,
[ script:cw-racingapp] "y": -370.42999267578127,
[ script:cw-racingapp] "z": 68.16000366210938
[ script:cw-racingapp] },
[ script:cw-racingapp] "raceId": "IR-1535",
[ script:cw-racingapp] "amount": 0,
[ script:cw-racingapp] "finished": false,
[ script:cw-racingapp] "started": false,
[ script:cw-racingapp] "racers": [
[ script:cw-racingapp] {
[ script:cw-racingapp] "citizenId": "JO1WL87D",
[ script:cw-racingapp] "racerName": "carai",
[ script:cw-racingapp] "source": 1
[ script:cw-racingapp] }
[ script:cw-racingapp] ],
[ script:cw-racingapp] "startCoords": {
[ script:cw-racingapp] "x": 180.3675537109375,
[ script:cw-racingapp] "y": -2978.03515625,
[ script:cw-racingapp] "z": 5.3304214477539
[ script:cw-racingapp] }
[ script:cw-racingapp] }
[ script:cw-racingapp] starting race
[ script:cw-racingapp] racer {
[ script:cw-racingapp] "citizenId": "JO1WL87D",
[ script:cw-racingapp] "racerName": "carai",
[ script:cw-racingapp] "source": 1
[ script:cw-racingapp] }
[ script:cw-racingapp] pinging player 1

this is what prints with the solo race enabled

viral rose
#

When Solo is off, do you get a debug log on client side also?
"[H2H] checking if anyone is close"

muted scroll
#

i get this in the client

#

i don't wanna make you worry about this, i'll disable the h2h by now, no need headaches right now

#

if i figure out how to fix it i'll text you

viral rose
#

Nah it might be t hat it has slipped between the cracks. I don't know how many actually use the feature actually

#

@granite steeple do you use H2H? Does it work for you?

The H2H files got a lot of changes in a patch when you went over them.

viral rose
#

Put out a new release @muted scroll

Not sure if it'll fix anything, but it might help find what could be wrong

muted scroll
#

i'll do it right now

muted scroll
#

got same error, and the debug seems the same

#

^2CW-RACINGAPP DEBUG:^0
[H2H] setting up race: $0
^2CW-RACINGAPP DEBUG:^0
JO1WL87D
{
"x": 968.4138793945313,
"y": -1559.3609619140626,
"z": 30.0815258026123
}
^2CW-RACINGAPP DEBUG:^0
[H2H] fetching data
{
"current": []
}

client debug

#

[ script:cw-racingapp] [RADB] getActiveRacerName | citizenId: JO1WL87D
[ script:cw-racingapp] setting up JO1WL87D carai vec3(968.413879, -1559.360962, 30.081526) 0
[ script:cw-racingapp] Race Data: {
[ script:cw-racingapp] "racers": [
[ script:cw-racingapp] {
[ script:cw-racingapp] "citizenId": "JO1WL87D",
[ script:cw-racingapp] "source": 1,
[ script:cw-racingapp] "racerName": "carai"
[ script:cw-racingapp] }
[ script:cw-racingapp] ],
[ script:cw-racingapp] "finished": false,
[ script:cw-racingapp] "started": false,
[ script:cw-racingapp] "raceId": "IR-1176",
[ script:cw-racingapp] "finishCoords": {
[ script:cw-racingapp] "x": 2402.2099609375,
[ script:cw-racingapp] "y": -693.010009765625,
[ script:cw-racingapp] "z": 62.45000076293945
[ script:cw-racingapp] },
[ script:cw-racingapp] "startCoords": {
[ script:cw-racingapp] "x": 968.4138793945313,
[ script:cw-racingapp] "y": -1559.3609619140626,
[ script:cw-racingapp] "z": 30.0815258026123
[ script:cw-racingapp] },
[ script:cw-racingapp] "amount": 0
[ script:cw-racingapp] }
[ c-scripting-core] script error in native 000000002f7a49e6: Argument at index 1 was null.
[ script:cw-racingapp] SCRIPT ERROR: native 000000002f7a49e6: Argument at index 1 was null.
[ script:cw-racingapp] > new StackDumpError (D:\SERVIDOR\server\citizen/scripting/v8/main.js:416)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:436)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:97)
[ script:cw-racingapp] > Number.__cfx_wrap_23091 (D:\SERVIDOR\server\citizen/scripting/v8/main.js:24)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:30)
[ script:cw-racingapp] > <unknown> (D:\SERVIDOR\server\citizen/scripting/v8/main.js:94)
[ script:cw-racingapp] > rawQuery (@oxmysql/dist/build.js:26512)
[ script:cw-racingapp] > process.processTicksAndRejections (node:internal/process/task_queues:105)

viral rose
#

On client side it should also log the player you invite

muted scroll
#

gonna clear the server cache and try again

#

this is what i get in the console

viral rose
#

That's strange

muted scroll
#

my friend created a brand new qbox server and installed the script and unfortunate he got the same error

viral rose
#

Pushed more logs to head2head files. could you test with those. There's no release, so just copy the content of the client/head2head.lua and server/head2head.lua into your code

muted scroll
#

this time that error didn't show in the server console but got error in the client
^2CW-RACINGAPP DEBUG:^0
[H2H] setting up race: $0
^2CW-RACINGAPP DEBUG:^0
JO1WL87D
{
"x": 528.5315551757813,
"y": -1502.7525634765626,
"z": 28.75975036621093
}
^2CW-RACINGAPP DEBUG:^0
[H2H] checking if anyone is close
IR-4160
^2CW-RACINGAPP DEBUG:^0
[H2H] Inviting nearby players
IR-4160
0
^1SCRIPT ERROR: @cw-racingapp/client/head2head.lua:193: bad argument #3 to 'format' (number expected, got string)^7

viral rose
#

Oh that's the print fucking up

#

one sec

#

Replace line 193 with

            DebugLog('^2[H2H] Inviting player^0 %s (%d)', playerId, 'with server id', GetPlayerServerId(playerId))
muted scroll
#

IT WORKED!

#

the invite was sent, he accepted and the race started normally

viral rose
#

But nothing I dod shoul'dve changed that

#

hahaha

#

I only added logs

muted scroll
#

i have no ideia how it worked, but worked hahahahhhaa

viral rose
#

Peak driving btw

#

🔥

muted scroll
#

lmao

#

my friend, i just wanna say thank you for everything, don't know what fixed the problem, but it worked now

#

thank you for your time, your script is insane