[HELP] Weird error

This error randomly popped up after the update.

image

Send your full code.

When you use the command, you enter the wrong values.

One last question, when my server reaches 25+, the server starts getting laggy and the buildings start to disappear. I also get hitch warnings. I also have a few errors.

Could the errors and hitch warnings the cause of the buildings to disappear?

@PrincessAshley Is this for FiveM? If so your in the wrong section you need the FiveM Development Section

Also, some good options would be stream less resources, optimise your scripts that are on your server as the errors are bad and the hitch warnings are basically telling you what scripts are effecting the performance of the server.

Hope this helps :slight_smile:

Oh lol I just realised now it’s redm :man_facepalming: my bad no wonder the page is red lol sorry

how do I check what script is causing it?

Open your β€˜F8’ console and type resmon 1 this should show you all your resources anything over 5ms will usually show up in the warning box.

Heres a post for improving resources has alot of good info [Best practice] Improve your resource performance

To turn off monitor, type resmon 0 in console

:slight_smile:

Thank you so much. Sorry for posting in the wrong section

1 Like

I have also spot a bit of too much locals in the command. Try to keep the locals outside and those that can be stacked, try to do it like so: local username, firstname, lastname = {} < that helps to speed the time it takes the code to be executed and the actual code cleaner. When you use the locals outside of the actual code you can use them that save the time and reduce the amount of time the actual command / script is taking to execute. Here is an example of my lapd command.

RegisterCommand(β€˜lapd’, function(source, args, rawCommand)

local xPlayer = ESX.GetPlayerFromId(source)

local msg = rawCommand:sub(5)

if xPlayer.job ~= nil and xPlayer.job.name == 'police' then

    TriggerClientEvent('chat:addMessage', -1, {

       template = '<div style="padding: 0.5vw; margin: 0.5vw; background-color: rgba(15, 0, 86, 0.6); border-radius: 3px;"><i class="far fa-address-card"></i> <b>LAPD</b>: {1}</div>',

       args = { source, msg }

    })

elseif xPlayer.job ~= nil and xPlayer.job.name == 'unemployed' then

    TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'error', text = 'You are not part of LAPD Department!', style = { ['background-color'] = '#fc1303', ['color'] = '#fffff' } })

end

end, false)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.