Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Cool on May 04, 2016, 02:46 PM

Title: alias does not exists
Post by: Cool on May 04, 2016, 02:46 PM

when i add this functions i got error alias does not exists
error line Alias.push( { Nick = GetSQLColumnData( q, 0 ), IP = GetSQLColumnData( q, 1 ), UID = GetSQLColumnData( q, 2 ) } );
i loaded onscriptload LoadAlias();
function LoadAlias()
{
local q = QuerySQL( sqliteDB, "SELECT * FROM Alias" ), i = 0;
while ( GetSQLColumnData( q, 0 ) != null )
{
Alias.push( { Nick = GetSQLColumnData( q, 0 ), IP = GetSQLColumnData( q, 1 ), UID = GetSQLColumnData( q, 2 ) } );
i ++;
GetSQLNextRow( q );
}
FreeSQLQuery( q );
print( "[Loaded] Alias - " + i );
}
Title: Re: alias does not exists
Post by: rulk on May 04, 2016, 03:02 PM
Have you created the array your trying to push elements into ?

Put this at the top of your code
Alias <- [];
Title: Re: alias does not exists
Post by: Cool on May 04, 2016, 03:05 PM
Thanks rulk i already put it but in medium now on top its works