[Ajuda] Erros em gamemode do zero... com MySQL
#1

=====
Estes erros eu pesquisei mas ainda n entendi o porquк desses erros '-':

Код:
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_sampdb.inc(14) : error 010: invalid function or declaration
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_sampdb.inc(15) : error 010: invalid function or declaration
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_samp.inc(31) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_mysql.inc(111) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_mysql.inc(111) : error 001: expected token: ";", but found "["
Vi em vбrios posts mas eles n resolveram '-'

=====
agora estes warnings

Код:
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(79) : warning 202: number of arguments does not match definition
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(79) : warning 202: number of arguments does not match definition
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(79) : warning 202: number of arguments does not match definition
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(79) : warning 202: number of arguments does not match definition
correspondem a esta linha:

PHP код:
mysql mysql_connect(hostuserdbpass); 
Alguйm me ajuda? Obrigado...
Reply
#2

manda o cуdigo de conexгo.
Reply
#3

Quote:
Originally Posted by GabrielDias_Invision
Посмотреть сообщение
manda o cуdigo de conexгo.
Este:

PHP код:
public OnPlayerConnect(playerid)
{
    new 
query[128];
    
GetPlayerName(playeridName[playerid], 24);
    
GetPlayerIp(playeridIP[playerid], 16);
    
mysql_format(mysqlquerysizeof(query),"SELECT `Password`, `ID` FROM `players` WHERE `Username` = '%e' LIMIT 1"Name[playerid]);
    
mysql_tquery(mysqlquery"OnAccountCheck""i"playerid);
    
    
//RESTO DO CODE
    
return 1;

ou este?

PHP код:
#define host    "localhost"
#define user    "root"
#define db        "truckntrailers"
#define pass     "" 
#EDIT
Usei este tutorial aqui como base...
Reply
#4

o meu aconteceu isso uma vez por causa de variaveis repetidas.

troca os nomes para:
Код:
#define mysql_host    "localhost"
#define mysql_user    "root"
#define mysql_database        "truckntrailers"
#define mysql_pass     ""
um exemplo, esse й ocmo estб o meu. E troca a variavel mysql por outro tipo 'conexao' ou sei la.
Reply
#5

Quote:
Originally Posted by GabrielDias_Invision
Посмотреть сообщение
o meu aconteceu isso uma vez por causa de variaveis repetidas.

troca os nomes para:
Код:
#define mysql_host    "localhost"
#define mysql_user    "root"
#define mysql_database        "truckntrailers"
#define mysql_pass     ""
um exemplo, esse й ocmo estб o meu. E troca a variavel mysql por outro tipo 'conexao' ou sei la.
Obrigado! reputado...

agora sу ficou uns warnings, mas devo resolver...

PHP код:
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\pawno\include\a_samp.inc(31) : warning 201redefinition of constant/macro (symbol "MAX_PLAYERS")
C:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(414) : warning 217loose indentation
C
:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(415) : warning 217loose indentation
C
:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(431) : warning 217loose indentation
C
:\Users\NikiFor\Documents\samp037_svr_R1_win32\gamemodes\gamemode.pwn(432) : warning 217loose indentation 
Reply
#6

vocк provavelmente definiu MAX_PLAYERS acima da include a_samp

os outros sгo de mб tabulaзгo de cуdigos
Reply


Forum Jump:


Users browsing this thread: