i get the error msg on ptokax:
Syntax error: attempt to concat global `Super' (a nil value)
stack traceback:
1: function `SendOPsUsers' at line 1118 [file `ToXiC/ToXiC.lua']
2: function `DataArrival' at line 346 [file `ToXiC/ToXiC.lua']
the part of code where the problem in is:
(the list of Super Users, Profile 2 is empty)
function SendOPsUsers (user, data)
local OPUsers = GetUsersByProfile(GetProfileName(3))
local Msg = "\r\n\t--------------------------------------------------------------------------------------"
Msg = Msg.."\r\n\t\tOperators"
Msg = Msg.."\r\n\t--------------------------------------------------------------------------------------"
local OPUsersTemp = {}
for OPIDX, n3 in OPUsers do
tinsert(OPUsersTemp, n3)
end
sort(OPUsersTemp)
for i=1,getn(OPUsersTemp) do
local _,_,ops = strfind(OPUsersTemp[i],"(%S+)")
Msg = Msg.."\r\n\t\t"..ops..""
if (not Msg) then
Operator = Msg.."\r\n\t\tNo Operators Currently"
elseif (Msg) then
Operator = Msg
end
end
local SUUsers = GetUsersByProfile(GetProfileName(2))
local Msg = "\r\n\t--------------------------------------------------------------------------------------"
Msg = Msg.."\r\n\t\tSuper Users"
Msg = Msg.."\r\n\t--------------------------------------------------------------------------------------"
local SUUsersTemp = {}
for SUIDX, n2 in SUUsers do
tinsert(SUUsersTemp, n2)
end
sort(SUUsersTemp)
for i=1,getn(SUUsersTemp) do
local _,_,sus = strfind(SUUsersTemp[i],"(%S+)")
Msg = Msg.."\r\n\t\t"..sus..""
if (not Msg) then
Super = Msg.."\r\n\t\tNo Operators Currently"
elseif (Msg) then
Super = Msg
end
end
local MAUsers = GetUsersByProfile(GetProfileName(1))
local Msg = "\r\n\t--------------------------------------------------------------------------------------"
Msg = Msg.."\r\n\t\tMasters"
Msg = Msg.."\r\n\t--------------------------------------------------------------------------------------"
local MAUsersTemp = {}
for MAIDX, n1 in MAUsers do
tinsert(MAUsersTemp, n1)
end
sort(MAUsersTemp)
for i=1,getn(MAUsersTemp) do
local _,_,mas = strfind(MAUsersTemp[i],"(%S+)")
Msg = Msg.."\r\n\t\t"..mas..""
if (not Msg) then
Master = Msg.."\r\n\t\tNo Masters Currently"
elseif (Msg) then
Master = Msg
end
end
local OwnerUsers = GetUsersByProfile(GetProfileName(0))
local Msg = "\r\n\t--------------------------------------------------------------------------------------"
Msg = Msg.."\r\n\t\tOwners"
Msg = Msg.."\r\n\t--------------------------------------------------------------------------------------"
local OwnerUsersTemp = {}
for OwnerIDX, n0 in OwnerUsers do
tinsert(OwnerUsersTemp, n0)
end
sort(OwnerUsersTemp)
for i=1,getn(OwnerUsersTemp) do
local _,_,owner = strfind(OwnerUsersTemp[i],"(%S+)")
Msg = Msg.."\r\n\t\t"..owner..""
if (not Msg) then
Owner = Msg.."\r\n\t\tNo Owners Currently"
elseif (Msg) then
Owner = Msg
end
end
user:SendPM(Bot, Owner.."\r\n"..Master.."\r\n"..Super.." "..Operator.."\r\n")
end
btw i edited this script:
http://board.univ-angers.fr/thread.php?threadid=802&boardid=11&sid=f7cf3184e0cdb5ca8c314334662f3c60
never mind, fixed already:
i added to all the profiles:
if getn(SUUsersTemp) == 0 then
Msg = Msg.."\r\n\t\tNo SuperUSers Currently\r\n"
Super = Msg
else ...