Jump to content
  • 0

erori ! ? ?


mugurvlad47

Question

Salut, vreau sa fac un sistem de register / login dar am intampinat 5 erori pe decursul muncii:

C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : error 017: undefined symbol "CheckAccountExists"
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(51) : error 017: undefined symbol "AccountExists"
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(51) : warning 215: expression has no effect
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(51) : error 001: expected token: ";", but found "]"
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(51) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
49: if(CheckAccountExists(UserStats[playerid][Name]))
51:  AccountExists[playerid] = 1;

Am definit AccountExists ( new AccountExits[MAX_PLAYERS]; )

CheckAccountExists(account[])
{
	new string[128];
    	format(string, sizeof(string), "SELECT * FROM Users WHERE Name = '%s'", account);
    	mysql_query(string);

	mysql_store_result();

	new value;
	value = mysql_num_rows();
	mysql_free_result();
	return value;
}

Daca se poate va rog sa ma ajutati. Multumesc!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
On 6/15/2017 at 10:58 AM, Gireada said:

Definesti AccountExists ca tot  ca


CheckAccountExists(account[]), functia declarata trebuie sa arate ca functia definita.

doar 4 erori dar inca sunt

C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : error 012: invalid function call, not a valid address
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : warning 215: expression has no effect
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : error 001: expected token: ";", but found ")"
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : error 029: invalid expression, assumed zero
C:\Users\mugur\Desktop\samp037_svr_R2-1-1_win32\gamemodes\bare.pwn(49) : fatal error 107: too many error messages on one line

new CheckAccountExists[MAX_PLAYERS];

Link to comment
Share on other sites

  • 0
La 6/15/2017 la 10:58, Gireada a spus:

Definesti AccountExists ca tot  ca


CheckAccountExists(account[]), functia declarata trebuie sa arate ca functia definita.

:S ... de ce sa isi faca o variabila :)) ?

lasa doar CheckAccountExists(account[]) vezi sa ai function inainte de numele functiei sterge tot ce tine de AccountExists si pui sa citeasca peste tot unde ar trebui sa verifice daca numele exista if(CheckAccountExists(nume) return si mesaju cum ca numele exista deja... bine inteles variabila (nume) sa se traga de la GetPlayerName

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

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.