clanstats

Started by :P, Sep 23, 2015, 08:30 AM

Previous topic - Next topic

:P

SLC is a good scripter but he always use bad words for abusing players :P

SAzEe21

This is last one :(
function TruncateClan(strPlayer)
  if ( S_DELIM != null )
{
                                                 // --- 2 letters in tag
                                   else if ( GetTag( strPlayer ).len() == 2 )

                { return strPlayer.slice( S_DELIM[ 0 ].begin + 3, S_DELIM[ 0 ].end + strPlayer.len() - FindClanTag(strPlayer).len() ); }



                                                  // --- 3 letters in tag
                                    else if ( GetTag( strPlayer ).len() == 3 )
                { return strPlayer.slice( S_DELIM[ 0 ].begin + 4, S_DELIM[ 0 ].end + strPlayer.len() - FindClanTag(strPlayer).len() ); }



                                                  // --- 4 letters in tag
                                    else if ( GetTag( strPlayer ).len() == 4 )
                { return strPlayer.slice( S_DELIM[ 0 ].begin + 5, S_DELIM[ 0 ].end + strPlayer.len() - FindClanTag(strPlayer).len() ); }


                                                  // --- 5 letters in tag no found for valid
                                    else if ( GetTag( strPlayer ).len() == 5 )
                { return strPlayer.slice( S_DELIM[ 0 ].begin + 6, S_DELIM[ 0 ].end + strPlayer.len() - FindClanTag(strPlayer).len() ); }


                                                  // --- 6 letters in tag no found for valid
                                    else if ( GetTag( strPlayer ).len() == 6 )
                { return strPlayer.slice( S_DELIM[ 0 ].begin + 7, S_DELIM[ 0 ].end + strPlayer.len() - FindClanTag(strPlayer).len() ); }


 }

:P

now not working any solution and any expert who can help me
SLC is a good scripter but he always use bad words for abusing players :P

FinchDon

Just Check at first of code you miss expression {
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

:P

on which first code
SLC is a good scripter but he always use bad words for abusing players :P

KAKAN

Stop scripting, else post your whole clanstats, so that we can actually test it
oh no

:P

#21
take it @KAKAN  as isay in uper posts i gettng error string does not exists in which function i posted in my uper posts ok
only the error of string does not exists error remains all solved by zeeshan
http://www.mediafire.com/download/041x08d7l4gksdk/Clanstats+by+P%26B.rar
and addmanager cmds not works its say i does not exists when i remove i  then says params does not exists when i remove it cmds leaves works
else if ( cmd == "addmanager" )
             {
                    // This command is for any admin
                    if ( !text ) Msg( "Syntax > !addmanager <[Tag]Owner> <[Tag]Leader> <[Tag]Leader2> <Clan-Without-Symbol>", player );
    else if ( i <= 3 ) Msg( "Syntax > !addmanager <[Tag]Owner> <[Tag]Leader> <[Tag]Leader2> <Clan-Without-Symbol>", player );
                    else
                       {
                       if ( !IsClanRegister( params[ 3 ].tolower() ) ) Msg( "Error > The clan " + params[ 3 ] + " is no register!", player );
                       else {
                                local Owner = params[ 0 ], Manager1 = params[ 1 ], Manager2 = params[ 2 ], Clan = params[ 3 ];
                              if ( !GetTag( Owner ) ) PM( "Error > The owner need clan!!", player );
                               else if ( !GetTag( Manager1 ) ) PM( "Error > The Manager 1 need clan!!", player );
                              else if ( !GetTag( Manager2 ) ) PM( "Error > The Manager 2 need clan!!", player );

                                All( player.Name + "'s added owner/managers in Clan: " + Clan );
                                All( "(Owner)-> " + Owner + " - (Managers)-> " + Manager1 + ", " + Manager2 );
                                QuerySQL( sDB, format( "UPDATE ClanStats SET Leaders='%s' WHERE Clan='" + Clan + "' COLLATE NOCASE", "" + Owner + ", " + Manager1 + ", " + Manager2 + "" ) );

                                PM( "Okay! Now need put !adduser <Your Player Of Clan> Example: deviL", player );
                                local dos = QuerySQL( sDB, "SELECT Users FROM ClanUsers WHERE Clans='" + Clan.tolower() + "' COLLATE NOCASE" ), Users = GetSQLColumnData( dos, 0 );
                                // Create Managers And owner in database dont delete this "DFAX0067XLPKDW"

                                if ( Users ) QuerySQL( sDB, format( "UPDATE ClanUsers SET Users='%s' WHERE Clans='" + Clan + "' COLLATE NOCASE", ""+Users+" " + TruncateClan( Owner ) + " " + TruncateClan( Manager1 ) + " " + TruncateClan( Manager2 ) + "" ) );
                                else QuerySQL( sDB, format( "UPDATE ClanUsers SET Users='%s' WHERE Clans='" + Clan + "' COLLATE NOCASE", "DFAX0067XLPKDW " + TruncateClan( Owner ) + " " + TruncateClan( Manager1 ) + " " + TruncateClan( Manager2 ) + "" ) );

                            }
                       }
             }
SLC is a good scripter but he always use bad words for abusing players :P

FinchDon

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

:P

SLC is a good scripter but he always use bad words for abusing players :P

Thijn

Post the actual error, along with the LOCALS and line numbers.

KAKAN

Quote from: Thijn on Sep 24, 2015, 05:36 AMPost the actual error, along with the LOCALS and line numbers.

Probably he has missed the locals in his script
oh no

SAzEe21

try this
else if ( cmd == "addmanager" )
             {
                    // This command is for any admin
                    if ( !text ) MessagePlayer( "Syntax > !addmanager <[Tag]Owner> <[Tag]Leader> <[Tag]Leader2> <Clan-Without-Symbol>", player );
      else if ( i <= 3 ) MessagePlayer( "Syntax > !addmanager <[Tag]Owner> <[Tag]Leader> <[Tag]Leader2> <Clan-Without-Symbol>", player );
                    else
                       {
                       if ( !IsClanRegister( params[ 3 ].tolower() ) ) MessagePlayer( "Error > The clan " + params[ 3 ] + " is no register!", player );
                       else {
                                local Owner = params[ 0 ], Manager1 = params[ 1 ], Manager2 = params[ 2 ], Clan = params[ 3 ];
                              if ( !GetTag( Owner ) ) PM( "Error > The owner need clan!!", player );
                               else if ( !GetTag( Manager1 ) ) PM( "Error > The Manager 1 need clan!!", player );
                              else if ( !GetTag( Manager2 ) ) PM( "Error > The Manager 2 need clan!!", player );

                                Message( player.Name + "'s added owner/managers in Clan: " + Clan );
                                Message( "(Owner)-> " + Owner + " - (Managers)-> " + Manager1 + ", " + Manager2 );
                                QuerySQL( sDB, format( "UPDATE ClanStats SET Leaders='%s' WHERE Clan='" + Clan + "' COLLATE NOCASE", "" + Owner + ", " + Manager1 + ", " + Manager2 + "" ) );

                                MessagePlayer( "Okay! Now need put !adduser <Your Player Of Clan> Example: deviL", player );
                                local dos = QuerySQL( sDB, "SELECT Users FROM ClanUsers WHERE Clans='" + Clan.tolower() + "' COLLATE NOCASE" ), Users = GetSQLColumnData( dos, 0 );
                                // Create Managers And owner in database dont delete this "DFAX0067XLPKDW"

                                if ( Users ) QuerySQL( sDB, format( "UPDATE ClanUsers SET Users='%s' WHERE Clans='" + Clan + "' COLLATE NOCASE", ""+Users+" " + TruncateClan( Owner ) + " " + TruncateClan( Manager1 ) + " " + TruncateClan( Manager2 ) + "" ) );
                                else QuerySQL( sDB, format( "UPDATE ClanUsers SET Users='%s' WHERE Clans='" + Clan + "' COLLATE NOCASE", "DFAX0067XLPKDW " + TruncateClan( Owner ) + " " + TruncateClan( Manager1 ) + " " + TruncateClan( Manager2 ) + "" ) );

                            }
                       }
             }

:P

functions line 897 = DBName <- GetSQLColumnData( q, 1 ).string();line no 152 =         if ( Clan && IsClanRegister( Clan.tolower() ) ) MessagePlayer( "Note: You clan \"" + Clan + "\" is in server :D!", player ), FindPlayerClan( player, player.Name );
SLC is a good scripter but he always use bad words for abusing players :P

KAKAN

Use:-
DBName <- GetSQLColumnData( q, 1 ).tostring();
oh no

SAzEe21

Quote from: KAKAN on Sep 24, 2015, 12:01 PMUse:-
DBName <- GetSQLColumnData( q, 1 ).tostring();
If he uses this then new error is appears like tostring does not exist :D