[help] attempt to call a nil value


#1

soo im still learning lua and made a /reviveciv command but i get some errors, this is the errors

attempt to call a nil value (global ‘stringsplit’)
stack traceback:
server.lua:2 in upvalue 'handler’
citizen/scripting/lua/scheduler.lua:175 in function
<citizen/scripting/lua/scheduler.lua:174>
stack traceback:
[C]: in function 'error’
citizen/scripting/lua/scheduler.lua:41 in field 'CreateThreadNow’
citizen/scripting/lua/scheduler.lua:174 in function
<citizen/scripting/lua/scheduler.lua:138>

I dont know if this is the right category to post this. :slight_smile:


#2

Don’t use the old hack everyone else seems to have a boner for. Instead, use the nice native RegisterCommand.