Jump to content
  • 0

ajutor eroare


Smulyz

Question

linia de cod:

if(mysql_errno(!= 0))(!= 0) print("[MySQL]: Baza de date nu s-a putut conecta cu succes.");

erorile:

C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(85) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(85) : warning 215: expression has no effect
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(85) : error 001: expected token: ";", but found ")"
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(85) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(85) : fatal error 107: too many error messages on one line

 

versiunea mysql r41-4

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

Linia respectiva trebuie sa arate in felul urmator:

if(mysql_errno(SQL) != 0) print("[MySQL]: Baza de date nu s-a putut conecta cu succes.");

Si inlocuiesti tu SQL cu numele variabilei tale pentru baza de date.

Edited by Akan

Discord:
! Akan !#6675

Link to comment
Share on other sites

  • 0
8 minutes ago, Akan said:

Linia respectiva trebuie sa arate in felul urmator:

if(mysql_errno(SQL) != 0) print("[MySQL]: Baza de date nu s-a putut conecta cu succes.");

Si inlocuiesti tu SQL cu numele variabilei tale pentru baza de date.

Acum imi da erorile astea 

C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(106) : error 017: undefined symbol "gQuery"
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(106) : warning 215: expression has no effect
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(106) : error 001: expected token: ";", but found "]"
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(106) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(106) : fatal error 107: too many error messages on one line
 

linia de cod|:

gQuery[0] = EOS;

linile de jos

mysql_format(SQL, gQuery, 128, "select = from accounts where Name = '%s' limit 1", GetName(playerid));
    mysql_tquery(SQL, gQuery, "checkAccount", "i", playerid);

Link to comment
Share on other sites

  • 0

Nu ai variabila globala "gQuery" definita.

Adauga pe la inceputul gamemode-ului:

new gQuery[1024];

Am pus orientativ 1024, poti pune tu cat consideri ca e nevoie pentru string-urile care folosesc gQuery.

Discord:
! Akan !#6675

Link to comment
Share on other sites

  • 0

asa 

new 
   MySQL:SQL, Iterator:playerLogged<MAX_PLAYERS>;
   new gQuery[1024];
 

sau asa

new 
   MySQL:SQL, Iterator:playerLogged<MAX_PLAYERS>;
   
   new gQuery[1024];

 

Link to comment
Share on other sites

  • 0

E acelasi lucru daca pui cu 1 rand distanta sau fara. Deci ambele sunt bune.

Sau poti pune direct 

new 
   MySQL:SQL, Iterator:playerLogged<MAX_PLAYERS>, gQuery[1024];

 

Discord:
! Akan !#6675

Link to comment
Share on other sites

  • 0

linia de la cod

mysql_format(SQL, gQuery, 128, "select = from accounts where Name = '%s' limit 1", GetName(playerid));

erorile

C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 215: expression has no effect
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 001: expected token: ";", but found "]"
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : fatal error 107: too many error messages on one line

 

Link to comment
Share on other sites

  • 0
17 hours ago, Smulyz said:

linia de la cod

mysql_format(SQL, gQuery, 128, "select = from accounts where Name = '%s' limit 1", GetName(playerid));

erorile

C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 029: invalid expression, assumed zero
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : warning 215: expression has no effect
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : error 001: expected token: ";", but found "]"
C:/Users/Hawai/OneDrive/Desktop/GM PRINCIPAL/gamemodes/main.pwn(111) : fatal error 107: too many error messages on one line

 

Da-mi discord-ul tau ca imi e mai usor sa te ajut asa decat sa las 100 de reply-uri aici.

  • Thanks 1

Discord:
! Akan !#6675

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.