Jump to content
  • 0

error 017: undefined symbol "gQuery"


Question

Posted

 public OnPlayerConnect(playerid) {
     gQuery[0] = EOS;
     mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `Name` = '%s' LIMIT 1', GetName(playerid));
     mysql_tquery(SQL, gQuery, "checkAccount', "i", playerid);
     return 1;

1 answer to this question

Recommended Posts

  • 0
Posted

Salut @Andrei SA-MP,

Problema provine din urmatorul motiv: Nu ai creata variabila gQuery in gamemode.

De obicei, aceasta e creata la inceputul gamemode-ului, undeva dupa ultimul include poti adauga urmatoarea linie:

new 
	gQuery[256];

 

[sau.....]

poti crea o variabila direct in publicul acela, iar codul va arata in felul urmator:

public OnPlayerConnect(playerid)
{
	new
	Query[100];

	mysql_format(SQL, Query, sizeof(Query), "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1;", GetName(playerid));
	mysql_tquery(SQL, Query, "checkAccount", "i", playerid);

	return true;
}

 

Daca te-am ajutat =>

spacer.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.