'tostring'

Started by BANDauthorized, Nov 18, 2016, 12:37 AM

Previous topic - Next topic

BANDauthorized

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

CALLSTACK
*FUNCTION [FindPlayerClan()] Functions.nut line [258]

LOCALS
[string] "BANDauthorized"
[player] INSTANCE
[this] TABLE
[player] INSTANCE
[this] TABLE
[player] INSTANCE
[this] TABLE

function FindPlayerClan( player, string )
{
        string = string;
        q <- QuerySQL( db, "SELECT * FROM ClanUsers WHERE Clans='" + GetTag( string ) + "' COLLATE NOCASE" );
        db <- GetSQLColumnData( q, 1 ).tostring(); //258
        TCC <- TruncateClan;

              if ( db.tolower().find( TCC( string.tolower() ) ) ) { PrivMessage( "Your Nick " + TCC( string ) + ", Clan: " + GetTag( string ), player ); } else { ClanKick( player ); return null; }
}

aXXo

You need to check the result of GetSQLColumnData( q, 1 ) before using the tostring() property.
If it is null, you will get the error.

Cool

This Clanstats Will never work if you fixed this error then its will start working but will  crash ur server better to leave