Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Problem with a_mysql | Making login/register mysql based

$
0
0
hi, i am newbie in pawno
i am trying to make a login register system mysql based
but facing two problems.....
Code:

D:\GTA San Andreas\Server\gamemodes\cdm.pwn(68) : error 035: argument type mismatch (argument 1)
D:\GTA San Andreas\Server\gamemodes\cdm.pwn(69) : error 017: undefined symbol "mysql_store_result"
Pawn compiler 3.2.3664                          Copyright (c) 1997-2006, ITB CompuPhase

The gm code [only DB info's included] :
Code:

#include <a_mysql>
#include <sscanf2>

#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DB ""

public OnGameModeInit()
{
        mysql_connect("SQL_HOST","SQL_USER","SQL_PASS","SQL_DB");
        // Don't use these lines if it's a filterscript
        SetGameModeText("Blank Script");
        AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
        return 1;
}

public OnPlayerConnect(playerid)
{
        new query[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid,name,sizeof(name));
        format(query,sizeof(query),"SELECT * FROM accounts WHERE username = %s",name);
       
        mysql_query(query);
        mysql_store_result();
       
        return 1;
}

Please Help mE :/
thanks in advance :)

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>