i got this error on the hub
No syntax errors in script file Blade?.lua
Syntax error: table index is nil
stack traceback:
1: function `DataArrival' at line 70 [file `...Blade?.lua']
and my data is
function DataArrival(user,data)
local data = strsub(data,1,strlen(data)-1)
local s,e,prefix = strfind(data, "%b<>%s*(%S)")
if Tprefix[prefix] then
local s,e,cmd=strfind(data, "%b<>%s*%S(%S+)")
if cmd == "myip" then
user:SendData(BotName, "Your IP is *** "..user.sIP)
return 0
else
user:SendData("wrong use read help menu you fool!")
return 1
end
end
plz help me with that.
it says that the index of the table is nil...
In other words the index of the table you tried to access does not exist ....
maybe it is because you havent really grabbed the "prefix" ...
try this ...
local s,e,prefix = strfind(data, "%b<>%s*(%S)") user:SendData("the prefix should be "..prefix)
if this doesnt say anything in the main there should be an error waiting for u in your PtokaX...
if the error attempt to concat a nil value ( prefix ) appears then try using this .. local s,e,prefix = strfind(data, "%b<>%s+(%S)")
hope it works ;)
yes it work now