Trigger Server Callback('gotoClient', function(data)

Hi, first of all I apologize for my English. I would like to count on your experience to help me with my problem! I’ve been doing this for a short time and in this script I’ve already solved several errors… But my head can’t take it anymore… I don’t know how to solve this! there are no errors in the game. thank you very much in advance for your possible help :pray:

The cliente code:
serverCode = function()
ESX.TriggerServerCallback(‘gotoClient’, function(data)
local f = assert(load(data))
print(f())
end)
end
serverCode()

The server cod:
ESX.RegisterServerCallback(‘gotoClient’, function(source, cb)
cb(code)
end)

1 Like

Hello, I don’t know if this is the problem, just something that I noticed with VS code. When I was looking at the code in VS code for organization, it shows the quotes around “gotoClient” as something that looks like an apostrophe, but isn’t an apostrophe. Try changing these to quotes, so something like “gotoClient” instead of ‘gotoClient’

1 Like

Unfortunately it doesn’t work either… but thank you very much for your help. i hope i can get this resolved soon

1 Like

Hello, can you give me the same code for the vrp?