This topic was marked solved by its starter, on August 29th, 2015, 12:36 PM
GetSQLColumnData Doesn't exists?

Xmair

  • Wiki Contributor
  • Posts: 874
GetSQLColumnData Doesn't exists?
« on August 29th, 2015, 05:21 AM »
Code: [Select]
else if ( cmd == "readl" )
{
if(GetLetter( player )==0) ClientMessage("No letters received found.",player,255,255,0)
else if (!player.IsSpawned) ClientMessage("You're not spawned.",player,255,255,0)
else
{
local q = QuerySQL( db, "SELECT * FROM letters WHERE SentTo='"+player.Name+"'");
if ( GetSQLColummnData(q,1) )
{
local cashl = GetSQLColumnData( q, 2 );
ClientMessage("Letter from :- " + GetSQLColumnData( q, 3 ) + ".")
ClientMessage("Letter :- " + GetSQLColumnData( q, 1 ) + ".")
ClientMessage("Money sent :- " + GetSQLColumnData( q, 2 ) + ".")
IncCash( player, cashl )
        QuerySQL( db, "DELETE FROM letters WHERE Message='" + msg + "'" );
    FreeSQLQuery( q );
}
}
}
Things I have in this function :-
    function GetLetter.
    function IncCash.
    Table is created.
Code: [Select]
QuerySQL( db, "CREATE TABLE IF NOT EXISTS letters ( SentTo VARCHAR(32), Message TEXT, Cash NUMERIC, Sentfrom VARCHAR(32) )");
Required and up to date everything like plugins and server.exe.
Error :-
onPlayerCommand Error :- The index "GetSQLColumnData" doesn't exists.
Yes, There is data inserted into that table, I've received a letter there.
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

Mashreq

  • Full Member
  • Posts: 126
Re: GetSQLColumnData Doesn't exists?
« Reply #1, on August 29th, 2015, 09:18 AM »
You have forgot to include player and r, g, b color codes in your ClientMessage as well as you have not defined what is msg while deleting something in database.

Xmair

  • Wiki Contributor
  • Posts: 874
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

Thijn

  • VC:MP Beta Tester
  • Posts: 1,689

Xmair

  • Wiki Contributor
  • Posts: 874
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter