Error

Started by kokia, Oct 15, 2015, 07:17 AM

Previous topic - Next topic

kokia

AN ERROR HAS OCCURED [the index 'slice' does not exist]

CALLSTACK
*FUNCTION [FBSSortNicks()] scripts/Bot.nut line [716]
*FUNCTION [FBSProcess1()] scripts/Bot.nut line [164]
why error is coming?
function FBSSortNicks( szList )
{
local a = NumTok( szList, " " );
local NickList = GetTok( szList, " ", 6, a ), i = 1;

FBS_NICKS <- array( 50, null );

while( GetTok( NickList, " ", i ) != "366" )
{
line 716 local levelnick = GetTok( NickList, " ", i ), nick = levelnick.slice( 1 ), level = levelnick.slice( 0, 1 );

if ( level == ":" ) AddNewNick(nick,1)
else if ( level == "+" ) AddNewNick( nick, 2 );
else if ( level == "%" ) AddNewNick( nick, 3 );
else if ( level == "@" ) AddNewNick( nick, 4 );
else if ( level == "&" ) AddNewNick( nick, 5 );
else if ( level == "~" ) AddNewNick( nick, 6 );
else AddNewNick( nick, 1 );
i ++;
}
}
function FBSProcess1( sz )
{
  local raw = split( sz, "\r\n" ), a, z = raw.len(), line;

for ( a = 0; a < z; a++ )
{
line = raw[ a ];

local FBS_PING = GetTok( line, " ", 1 ), FBS_EVENT = GetTok( line, " ", 2 ), FBS_CHANEVENT = GetTok( line, " ", 3 ),
Count = NumTok( line, " " ), Nick, Command, Prefix, Text;

if ( FBS_PING == "PING" ) EchoBots[1].Send( "PONG " + FBS_PING + "\n" );

if ( FBS_EVENT == "001" )
{
if ( EchoBots[1] )
{
EchoBots[1].Send( "PRIVMSG NickServ :IDENTIFY " + FBS_BPASS + "\n" );
EchoBots[1].Send( "MODE " + BotNames[1] + " +B\n" );
EchoBots[1].Send( "JOIN " + FBS_CHAN + " " + FBS_CPASS + "\n" );
}
}
line 164 else if ( FBS_EVENT == "353" ) FBSSortNicks( sz );
else if ( ( FBS_EVENT == "MODE" ) || ( FBS_EVENT == "NICK" ) || ( FBS_EVENT == "JOIN" ) || ( FBS_EVENT == "PART" ) || ( FBS_EVENT == "QUIT" ) ) EchoBots[1].Send( "NAMES :" + FBS_CHAN + "\n" );
}
}
fix pllllzzzz

Mashreq

When does this error shows up?
Please specify more about the error.

KAKAN

Probably when someone uses a command after a space before the command.
oh no

MacTavish

In your irc channel replace : with - your problem will be solved

E.g: i use  Hi : i am kusanagi : thanks for join

Change to

Hi - i am kusanagi - thanks for join

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

kokia

not works :(
help please
i get this error whenever i use "ActivateEcho()"