Getting a script in chat box whenever I do a / command

So ever since I upgraded my server to the FX server, any command it seems like that has a / in it, it works but it also adds a script in the chat box for some reason. Example: http://prntscr.com/g9tdd6

I seem to get it with the /dv script… is it maybe cause its not made for FX?? Any help would be appreciated, thanks.

https://wiki.fivem.net/wiki/Running_FXServer
Read the porting notes for string splitting

2 Likes

Okay I read that just now, but me being fairly new to this I am confused on where to put that? Is it inside an actual file, or do I need to make a new one?

Whereever the ‘stringsplit’ function is in your code. Replace that function with the function in the link

3 Likes

Okay I gotcha, I fixed it with one of my scripts but the /dv script doesn’t have a stringsplit part of the code.

You would have to add it.

sir where would I add this in the script?

What do you mean?
(20 chars)

To quote “You would have to add it.” When talking about the split string function. I’m new to coding at still learning. For example anytime we use our /911 script the lua shows in chat. Just curious where the function needs to go or be replaced? I apologize in advance like I said I’m still learning

You will need to find the existing stringsplit function and replace it with the one from the wiki, if that’s even the error it is giving you.

Yes as @Briglair said, just replace the regular stringsplit function with the new one. If for some reason you were like me and some of your scripts do not have a stringsplit function, therefore I added the stringsplit function to the bottom of the server.lua and that seemed to fix the issue for me when there was no stringsplit function available.

Awesome. All you guys who helped rock. I really appreciate it! I know my community will

1 Like