Das Mysql nervt mich zu tode .... Hilfe ?!

15 Beiträge · 11.538 Aufrufe
13.02.2021, 23:23 #1

Hey zusammen,


Wie in meiner Vorstellung bereits erwähnt, versuche Ich seit knapp 14 Tagen einen eigenen Server aufzusetzen.

Wir sind bereits ziemlich enttäuscht von einem Hoster zum anderen gewechselt - aber egal wohin, immer ploppen die Probleme auf.

Seit 3 Tagen heißt mein Problem :

Mysql !


und die Meldung dazu:

SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:924: No such export mysql_fetch_all in resource mysql-async


Es ist zum Haare raufen, egal was ich tue, ich schaffe es nicht das Problem in den Griff zu bekommen - und solange das nicht geht - nix mit Joinen - nix mit durchstarten.

Die Details:


Ich arbeite mittlerweile mit einem gekauften Template Server - jaaa, schade um das Geld - aber aus Fehlern lernt man.

Dieser läuft auf ESX es_extended 1.2 Base, kommt mit einer eigenen .sql, eigenem Mysql - async, esx, essential, extras, maps, etc.

Das Aufstetzen des Gameservers hat wunderbar geklappt, lief alles gut.

Dann hatten wir probleme mit dem Hoster und FiveM - einer war permanent Down.

Eines Morgens war der Server leer und das Backup defekt - laut Hoster unsere Schuld, genau wie die Connect Probleme.

Also den Hoster gewechselt.

Bei neuen Hoster gibt es die Möglichkeit den Gameserver mit einem Modmanager aufzusetzen, Dunko zu nutzen oder ebent seinen eigene aufzusetzen.

Die ersten beide Variationen endeten mit Mysql Problemen, also x mal die Datenbank und die Server neu aufgesetzt.Momentan läuft der Template - aber eben auch mit dem mysql Fehler.Der variert übrigens von Modell zu Modell - merkwürdig.

Ich habe zwischendrin auch die Software gewechselt, verschiedene sql importiert, alles mögliche probiert, das WWW durchkämmt, mich auf crfx usw totgelesen, keine Chance diesen hartnäckigen Fehler auszumerzen.


Ich hoffe hier also auf die Schwarmintelligenz - Ich will diesen Fehler loswerden und den Server zum laufen bringen.


Was mache Ich falsch ?

Zuletzt bearbeitet von Letty am 13.02.2021, 23:29
14.02.2021, 21:40 #2

Die Datenbank verbunden?

MFG

15.02.2021, 10:47 #3

Jep, mittlerweile läuft es - keine Ahnung warum und wie.


Ich hoffe es bleibt so ^^

Never touch a running System ;)


Dafür hab ich jetzt andere Fehlermeldungen die mich nieder machen:


Mumble sagt: attempt to call nil Value ( global 'MumblecreateChannel')


Basic needs sagt: attempt to call a nil value (field 'RegisterCommand')

Stack traceback: @esx_basicneeds/server/main.lua:59: in main chunk


VehicleExtraMenu sagt: attempt to concatenate a nil value (up value 'newestVersion')


Esx_society sagt: attempt to index a nil value (field '?')


Das ist eine Nil value verschwörung xD

Wenn mir dann bitte jemand das Nil Value Problem erklären könnte?

Dafür reicht mein Schul Englisch leider nicht aus ^^


P. S: Fehlermeldungen auf dem Sprung zur Arbeit abgetippt auf dem Handy - wenn nötig setz ich später noch Schreens rein.

09.08.2021, 00:16 #4

Bei mir kommt auch ein fehler zwar :



SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:1155: No such export setAutoSpawn in resource spawnmanager


und wenn ich in mein Server will bin ich in ein endlosen Await scripts ladevorgang


Kann mir jemand vllt helfen

09.08.2021, 17:53 #5

scheint das die Funtkion setAutoSpawn fehlt

10.08.2021, 00:19 #6

Ibovan Wie könnte ich das ändern? welchen befehl müsste ich in eine datei schreiben und in welchen ordner/welche Datei


Danke schonmal im vorraus :)

10.08.2021, 22:14 #7

hast du ein Script der spawnmanager heißt

hier meiner

-- in-memory spawnpoint array for this script execution instance

local spawnPoints = {}


-- auto-spawn enabled flag

local autoSpawnEnabled = false

local autoSpawnCallback


-- support for mapmanager maps

AddEventHandler('getMapDirectives', function(add)

-- call the remote callback

add('spawnpoint', function(state, model)

-- return another callback to pass coordinates and so on (as such syntax would be [spawnpoint 'model' { options/coords }])

return function(opts)

local x, y, z, heading


local s, e = pcall(function()

-- is this a map or an array?

if opts.x then

x = opts.x

y = opts.y

z = opts.z

else

x = opts[1]

y = opts[2]

z = opts[3]

end


x = x + 0.0001

y = y + 0.0001

z = z + 0.0001


-- get a heading and force it to a float, or just default to null

heading = opts.heading and (opts.heading + 0.01) or 0


-- add the spawnpoint

addSpawnPoint({

x = x, y = y, z = z,

heading = heading,

model = model

})


-- recalculate the model for storage

if not tonumber(model) then

model = GetHashKey(model, _r)

end


-- store the spawn data in the state so we can erase it later on

state.add('xyz', { x, y, z })

state.add('model', model)

end)


if not s then

Citizen.Trace(e .. "\n")

end

end

-- delete callback follows on the next line

end, function(state, arg)

-- loop through all spawn points to find one with our state

for i, sp in ipairs(spawnPoints) do

-- if it matches...

if sp.x == state.xyz[1] and sp.y == state.xyz[2] and sp.z == state.xyz[3] and sp.model == state.model then

-- remove it.

table.remove(spawnPoints, i)

return

end

end

end)

end)



-- loads a set of spawn points from a JSON string

function loadSpawns(spawnString)

-- decode the JSON string

local data = json.decode(spawnString)


-- do we have a 'spawns' field?

if not data.spawns then

error("no 'spawns' in JSON data")

end


-- loop through the spawns

for i, spawn in ipairs(data.spawns) do

-- and add it to the list (validating as we go)

addSpawnPoint(spawn)

end

end


local spawnNum = 1


function addSpawnPoint(spawn)

-- validate the spawn (position)

if not tonumber(spawn.x) or not tonumber(spawn.y) or not tonumber(spawn.z) then

error("invalid spawn position")

end


-- heading

if not tonumber(spawn.heading) then

error("invalid spawn heading")

end


-- model (try integer first, if not, hash it)

local model = spawn.model


if not tonumber(spawn.model) then

model = GetHashKey(spawn.model)

end


-- is the model actually a model?

if not IsModelInCdimage(model) then

error("invalid spawn model")

end


-- is is even a ped?

-- not in V?

--[[if not IsThisModelAPed(model) then

error("this model ain't a ped!")

end]]


-- overwrite the model in case we hashed it

spawn.model = model


-- add an index

spawn.idx = spawnNum

spawnNum = spawnNum + 1


-- all OK, add the spawn entry to the list

table.insert(spawnPoints, spawn)


return spawn.idx

end


-- removes a spawn point

function removeSpawnPoint(spawn)

for i = 1, #spawnPoints do

if spawnPoints[i].idx == spawn then

table.remove(spawnPoints, i)

return

end

end

end


-- changes the auto-spawn flag

function setAutoSpawn(enabled)

autoSpawnEnabled = enabled

end


-- sets a callback to execute instead of 'native' spawning when trying to auto-spawn

function setAutoSpawnCallback(cb)

autoSpawnCallback = cb

autoSpawnEnabled = true

end


-- function as existing in original R* scripts

local function freezePlayer(id, freeze)

local player = id

SetPlayerControl(player, not freeze, false)


local ped = GetPlayerPed(player)


if not freeze then

if not IsEntityVisible(ped) then

SetEntityVisible(ped, true)

end


if not IsPedInAnyVehicle(ped) then

SetEntityCollision(ped, true)

end


FreezeEntityPosition(ped, false)

--SetCharNeverTargetted(ped, false)

SetPlayerInvincible(player, false)

else

if IsEntityVisible(ped) then

SetEntityVisible(ped, false)

end


SetEntityCollision(ped, false)

FreezeEntityPosition(ped, true)

--SetCharNeverTargetted(ped, true)

SetPlayerInvincible(player, true)

--RemovePtfxFromPed(ped)


if not IsPedFatallyInjured(ped) then

ClearPedTasksImmediately(ped)

end

end

end


function loadScene(x, y, z)

if not NewLoadSceneStart then

return

end


NewLoadSceneStart(x, y, z, 0.0, 0.0, 0.0, 20.0, 0)


while IsNewLoadSceneActive() do

networkTimer = GetNetworkTimer()


NetworkUpdateLoadScene()

end

end


-- to prevent trying to spawn multiple times

local spawnLock = false


-- spawns the current player at a certain spawn point index (or a random one, for that matter)

function spawnPlayer(spawnIdx, cb)

if spawnLock then

return

end


spawnLock = true


Citizen.CreateThread(function()

-- if the spawn isn't set, select a random one

if not spawnIdx then

spawnIdx = GetRandomIntInRange(1, #spawnPoints + 1)

end


-- get the spawn from the array

local spawn


if type(spawnIdx) == 'table' then

spawn = spawnIdx

else

spawn = spawnPoints[spawnIdx]

end


--[[if not spawn.skipFade then

DoScreenFadeOut(500)


while not IsScreenFadedOut() do

Citizen.Wait(0)

end

end]]


-- validate the index

if not spawn then

Citizen.Trace("tried to spawn at an invalid spawn index\n")


spawnLock = false


return

end


-- freeze the local player

--freezePlayer(PlayerId(), true)


-- if the spawn has a model set

if spawn.model then

RequestModel(spawn.model)


-- load the model for this spawn

while not HasModelLoaded(spawn.model) do

RequestModel(spawn.model)


Wait(0)

end


-- change the player model

SetPlayerModel(PlayerId(), spawn.model)


-- release the player model

SetModelAsNoLongerNeeded(spawn.model)


-- RDR3 player model bits

if N_0x283978a15512b2fe then

N_0x283978a15512b2fe(PlayerPedId(), true)

end

end


-- preload collisions for the spawnpoint

--RequestCollisionAtCoord(spawn.x, spawn.y, spawn.z)


-- spawn the player

local ped = PlayerPedId()


-- V requires setting coords as well

--SetEntityCoordsNoOffset(ped, spawn.x, spawn.y, spawn.z, false, false, false, true)


--NetworkResurrectLocalPlayer(spawn.x, spawn.y, spawn.z, spawn.heading, true, true, false)


-- gamelogic-style cleanup stuff

ClearPedTasksImmediately(ped)

SetEntityHealth(ped, 300) -- TODO: allow configuration of this?

RemoveAllPedWeapons(ped) -- TODO: make configurable (V behavior?)

ClearPlayerWantedLevel(PlayerId())


-- why is this even a flag?

--SetCharWillFlyThroughWindscreen(ped, false)


-- set primary camera heading

--SetGameCamHeading(spawn.heading)

--CamRestoreJumpcut(GetGameCam())


-- load the scene; streaming expects us to do it

--ForceLoadingScreen(true)

--loadScene(spawn.x, spawn.y, spawn.z)

--ForceLoadingScreen(false)


local time = GetGameTimer()


--while (not HasCollisionLoadedAroundEntity(ped) and (GetGameTimer() - time) < 5000) do

-- Citizen.Wait(0)

--end


--ShutdownLoadingScreen()


--[[[if IsScreenFadedOut() then

DoScreenFadeIn(500)


while not IsScreenFadedIn() do

Citizen.Wait(0)

end

end]]


-- and unfreeze the player

--freezePlayer(PlayerId(), false)


--TriggerEvent('playerSpawned', spawn)


if cb then

cb(spawn)

end


spawnLock = false

end)

end


-- automatic spawning monitor thread, too

local respawnForced

local diedAt


Citizen.CreateThread(function()

-- main loop thing

while true do

Citizen.Wait(50)


local playerPed = PlayerPedId()


if playerPed and playerPed ~= -1 then

-- check if we want to autospawn

if autoSpawnEnabled then

if NetworkIsPlayerActive(PlayerId()) then

if (diedAt and (math.abs(GetTimeDifference(GetGameTimer(), diedAt)) > 2000)) or respawnForced then

if autoSpawnCallback then

autoSpawnCallback()

else

spawnPlayer()

end


respawnForced = false

end

end

end


if IsEntityDead(playerPed) then

if not diedAt then

diedAt = GetGameTimer()

end

else

diedAt = nil

end

end

end

end)


function forceRespawn()

spawnLock = false

respawnForced = true

end


exports('spawnPlayer', spawnPlayer)

exports('addSpawnPoint', addSpawnPoint)

exports('removeSpawnPoint', removeSpawnPoint)

exports('loadSpawns', loadSpawns)

exports('setAutoSpawn', setAutoSpawn)

exports('setAutoSpawnCallback', setAutoSpawnCallback)

exports('forceRespawn', forceRespawn)

10.08.2021, 23:03 #8

Ibovan vielen dank bloß hab ich nur noch ein Problem und zwar häng ich jetzt immer noch in der endlosschleife mit Awaiting scripts

dazu hab ich ein Bild gepostet hier: 50e2cbdaddf4dd5ff39c4e2f7cb8bae1d7b2368a.jpeg

Das Problem oben müsste man nicht mehr angucken da es sich geklärt hat doch unten rechts hat sich das Problem mit Awaiting scripts nicht geklärt wäre nett wenn sie mir da auch helfen könnten (:

10.08.2021, 23:17 #9

lad dir mal die die Server dateien von

https://github.com/citizenfx/cfx-server-data

runter

mapmanager spawnmager etc..


und reihenfolge in server.cfg beachten

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure rconlog

wenn das alles nicht hilft kannst mich mal adden schaue ich mal darüber

Discord Ibovan#6007

10.08.2021, 23:25 #10

setAutoSpawn wird in den recourcen von

basic-gamemode

spawnmager

verwendet


hast du Scripts wie esx_kashacters? Multicharsystem? hier kommt setAutoSpawn auch vor

10.08.2021, 23:37 #11

setAutoSpawn wird in den recourcen von

basic-gamemode

spawnmager

verwendet


hast du Scripts wie esx_kashacters? Multicharsystem? hier kommt setAutoSpawn auch vor

Wo wäre denn esx_kashacters und Multicharsystem? bin erst neu mit diesen Sachen deswegwen es kommen in der Console keine fehler mehr


Aufjedenfall konnte ich Awaiting scripts nicht beheben

10.08.2021, 23:40 #12

Wo wäre denn esx_kashacters und Multicharsystem? bin erst neu mit diesen Sachen deswegwen es kommen in der Console keine fehler mehr


Aufjedenfall konnte ich Awaiting scripts nicht beheben

Wie es aber aussieht hab ich das nicht

02.10.2021, 23:58 #13


  1. SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:924: No such export mysql_fetch_all in resource mysql-async

    Den Fehler habe ich auch nun.
    Ich weiß, man muss eine Datenbank anlegen, aber ich weiß ehrlich gesagt nicht wie. Kann wer helfen? :D
04.10.2021, 20:42 #14

Welches Betriebssystem?

30.08.2026, 15:10 #15

Hey zusammen,

der Thread ist über die Zeit ziemlich gewachsen, mehrere unterschiedliche Fehler von mehreren Leuten in einem Thema. Trotzdem taucht ein Fehler gleich zweimal auf: No such export mysql_fetch_all in resource mysql-async. Das ist kein Zufall, sondern ein bekanntes Problem:

  • mysql-async wird schon lange nicht mehr weiterentwickelt, und mysql_fetch_all fehlt in neueren Versionen bzw. wurde durch andere Exports ersetzt. Der Standard in der Community ist inzwischen oxmysql, das die alten mysql-async-Exports zur Kompatibilität nachbildet.
  • Bevor man den Resource-Ordner tauscht: Startreihenfolge in der server.cfg prüfen. Die Datenbank-Resource muss vor allen abhängigen Scripts mit ensure gestartet werden, sonst fehlt der Export beim Laden schlicht noch.

@DerKalteFrostii, deine Frage nach dem Betriebssystem steht noch offen. Falls das Problem bei @Henry noch besteht: welches Framework (ESX-Version?) läuft da, und ist mysql-async aktuell oder eine ältere, gepinnte Version?

~ Dieser Post wurde mithilfe von KI-Inhalten generiert.

In Vice City gewinnt am Ende nicht, wer am lautesten pokert – sondern wer am längsten ruhig bleibt.
Diese Woche hat sich das hier mal wieder bestätigt.

Melde dich an, um zu antworten.
© 2026 GTA-FIVEM.ORGImpressumDatenschutzNutzungsbedingungenCookiesShimo Forum