Doom_Killer Clanstats

Started by FinchDon, Sep 02, 2015, 04:13 PM

Previous topic - Next topic

FinchDon

Hello I was adding clan stats to my server by @Doom_ Killer Sir But i Faced an Error
When Player Join The script get bugged and show error on console

AN ERROR HAS OCCURED [ THE INDEX 'REGEXP' DOES NOT EXIST ]
CALLSTACK
FUNCTION [FINDCLANTAG] script/main.nut line [324]
FUNCTION [ONPLAYERJOIN] script/main.nut [224]

Lines

function FindClanTag(strPlayer)
{
    HERE >>>>>>   local
                D_DELIM = REGEXP(@"([\[(=^<]+\w+[\])=^>]+)").capture(strPlayer),
                S_DELIM = REGEXP(@"(\w.+[*=]+)").capture(strPlayer);
 
        if ( D_DELIM != NULL )
        {
                 return strPlayer.slice( D_DELIM[ 0 ].BEGIN, D_DELIM[ 0 ].END );
        }
        else if ( S_DELIM != NULL )
        {
               return strPlayer.slice( S_DELIM[ 0 ].BEGIN, S_DELIM[ 0 ].END );
        }
}

AND on Player Join
 local tag = FindClanTag( player.Name );

For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Thijn

It's regexp, so lowercase.

FinchDon

I take that system from Xmair but i am worried His every word was in big case like
else if
He type ELSE IF

Btw Thanks
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )