Skip to content

[ox_core] isDead can only be an integer #28

@thaibossaw

Description

@thaibossaw

Currently, ND_Ambulance sets the player state value for isDead to "eliminated" or "knocked", however this is incompatible with ox_core's SQL schema and results in errors within the server log such as the following:

05:21:46 PM ║              STDERR║ (node:4620) UnhandledPromiseRejectionWarning: SqlError: (conn:490, no: 1366, SQLState: 22007) Incorrect integer value: 'knocked' for column `ox_core`.`characters`.`isDead` at row 1
05:21:46 PM ║              STDERR║ sql: UPDATE characters SET x = ?, y = ?, z = ?, heading = ?, isDead = ?, lastPlayed = CURRENT_TIMESTAMP(), health = ?, armour = ?, statuses = ? WHERE charId = ? - parameters:[240.56703186035156,-1378.786865234375,32.91943359375,39.68503952026367,'knocked',0,0,'...
05:21:46 PM ║              STDERR║     at module2.exports.createError (@ox_core/dist/server.js:2494:14)
05:21:46 PM ║              STDERR║     at _PacketNodeEncoded.readError (@ox_core/dist/server.js:3036:23)
05:21:46 PM ║              STDERR║     at Execute.readResponsePacket (@ox_core/dist/server.js:13277:32)
05:21:46 PM ║              STDERR║     at PacketInputStream.receivePacketBasic (@ox_core/dist/server.js:8663:13)
05:21:46 PM ║              STDERR║     at PacketInputStream.onData (@ox_core/dist/server.js:8707:24)
05:21:46 PM ║              STDERR║     at Socket.emit (node:events:518:28)
05:21:46 PM ║              STDERR║     at addChunk (node:internal/streams/readable:561:12)
05:21:46 PM ║              STDERR║     at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
05:21:46 PM ║              STDERR║     at Readable.push (node:internal/streams/readable:392:5)
05:21:46 PM ║              STDERR║     at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
05:21:46 PM ║              STDERR║ (node:4620) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions