How do i Fix the stringsplit function?

so how do i Fix the stringsplit function because every time i type in a command or something this comes up Screenshot (218)

please help!

Use this stringsplit function

function stringsplit(inputstr, sep) if sep == nil then sep = "%s" end local t={} ; i=1 for str in string.gmatch(inputstr, "([^"..sep.."]+)") do t[i] = str i = i + 1 end return t end

Sorry for the bad paste of code I am on my phone. The function is at the bottom of this page.

https://wiki.fivem.net/wiki/Running_FXServer

Instead of adding the splitstring function, I would suggest using another resource. The one you are using is clearly no longer being updates nor developed.

so what exactly do i do no one ever explains

The point is, you are running an old version of a resource, because its old it’s missing some functionality thats expected to be builtin on the server, but thats missing.

My recommendation is to not use the old resource. Instead, find a replacement resource that is being developed and maintained.

You need to find out which resource causes this error, you can do so by looking which command gives the error and relating that back to the resource that has the command.

they all have the error

Then you should replace all the resources, since they are clearly no longer maintained.
Find an alternative to them.

i’m having the same problem as of right now and i have no other place to look but here for help and answer

@Sonny You are using a super old resource. Remove the old resource or fix it.