Callback error

I am getting this obnoxious error which has little to no information at all for me to understand


[DarkRP] gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:78: attempt to call field 'callback' (a nil value)
  1. RP_PlayerChat - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:78
   2. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:142


I am basically trying to make a system that puts a player in a queue (sets pdata) but its not working
this is my code:


snip

this is a sv_ file, inside an addon in darkrpmodules
can someone help me figure out what to do ?

a nil value means “rs_init” is nil for some reason. Is there any other errors occurring? Also you need to return “” at the end of your function.

Here is an example: http://wiki.darkrp.com/index.php/LUA:DarkRP_Chat_Command

It’s probaby because of the weird structure I made with else if, also I believe i wrote else if wrong