Jump to content
  • 0

Problema "run Tim Error 19"


Stark.sys

Question

Problemă întâlnită (descriere): Am facut un include pentru conectiunea cu baza de date mysql si cand il adaug imi da Run time error 19.
Ero(area / rile) / warning-(ul / urile): Run time error 19
Liniile de cod / sursa / script-ul: [pawn]/*
* SA-MP MySQL Connect client for pawn
*
* © Copyright 2014, sRk7
*
*/

#include 

// Define host connections.
#define s_host "127.0.0.1" // or localhost
#define s_user "root"
#define s_pass "" // No pass resquest
#define s_db "sdb"

// Create a options of login and reconect of db
// new handle;
// new rows, fields;
// new temp[256];


// Create public function of pawn
stock MySQLConnect()
{
mysql_connect(s_host, s_user, s_db, s_pass);

if(mysql_errno(1) == 0)
{
printf("MySQL: Connections to database (%s) was established !", s_db);
}
else
{
printf("MySQL: Connections to database (%s) failed !", s_db);
}

return 1;
}

// How to use
native MySQLConnect();[/pawn]
Imagini / Video (optional): - 
Aţi încercat să rezolvaţi singur?: Da, cand il scot imi merge :-?

"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Nu inteleg de ce l-ai facut sub forma de include,cand asta vine in GM.

PS:Puneai stock la sfarsitul modului si native-ul ala la inceput la include-uri.

stock MySQLConnect()
{
mysql_connect(s_host, s_user, s_db, s_pass);
if(mysql_errno(1) == 0)
{
printf("MySQL: Connections to database (%s) was established !", s_db);
}
else
{
printf("MySQL: Connections to database (%s) failed !", s_db);
}

native MySQLConnect();
Edited by Adrian_Petre
  • Upvote 1

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.