Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

invalid connection handle

I started scripting a fresh new TDM script from 0 and I wanted to try out the bcyrpt hashing alg and everything went fine I...

ID
d6ouivfilegovhg7bcmg
author
idontmiss's avatar

IdontMIss

@idontmiss


View profile
Copy link
  Report member
started
Aug 4, 2019
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
invalid connection handle
idontmiss's avatar

IdontMIss

@idontmiss


View profile
Copy link
  Report member
• 6y
Pawn Scripting

invalid connection handle

pawn

I started scripting a fresh new TDM script from 0 and I wanted to try out the bcyrpt hashing alg and everything went fine I created a register/login system but when I wanted to test it next things happend:

myScript:

public OnPlayerConnect(playerid) {
?? ?new query[256];
?? ?mysql_format(SQL, query, sizeof query, "SELECT * FROM `players` WHERE `name`='%e' LIMIT 1", GetPlayerNameEx(playerid)); // 9
??? mysql_pquery(SQL, query, "OnAccountCheck", "i", playerid); // 10
??? #if defined reg_OnPlayerConnect
??????? return reg_OnPlayerConnect(playerid);
??? #else
??????? return true;
??? #endif
}
#if defined _ALS_OnPlayerConnect
??? #undef OnPlayerConnect
#else
??? #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect reg_OnPlayerConnect
#if defined reg_OnPlayerConnect
??? forward reg_OnPlayerConnect(playerid);
#endif



The errors I get in mysql

[INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[DEBUG] CThreadedConnection::WorkerFunc(this=0x41ea020, connection=0x41ea020)
[DEBUG] mysql_format(111, 0x0307AF98, 256, "SELECT * FROM `players` WHERE `name` = '%e'") (modules/register.pwn:10)
[ERROR] mysql_format: invalid connection handle '111' (modules/register.pwn:10)
[DEBUG] mysql_pquery(111, "", "OnAccountCheck", "i") (modules/register.pwn:11)
[ERROR] mysql_pquery: invalid connection handle '111' (modules/register.pwn:11)
[DEBUG] mysql_pquery: return value: '0' (modules/register.pwn:11)



EDIT: I use R41-4 and this happens after OnGameModeInit, and my connection is successful

0 likes0 replies

    Please sign up or log in to reply