19.08.2017, 03:24
Alguem ajuda? tou tentando salvar as armas do player por esse tutorial: https://sampforum.blast.hk/showthread.php?tid=505081
1.
so que nao tou conseguindo achar essa parte:
alguem sabe onde fica?
2.
nessa parte:
da esses erros:
entao eu coloquei assim:
e deu esses warnings:
OBS: Eu deixei as linhas do erros/warns marcadas com "LINHAS ERROS/WARNS:"
1.
so que nao tou conseguindo achar essa parte:
![](http://i.imgur.com/jimV9oM.jpg)
2.
nessa parte:
PHP код:
public OnLoadPlayerWeapons(playerid)
{
new
weaponid,
ammo;
LINHA ERRO: for(new i, j = cache_get_row_count(Connectmysql); i < j; i++) // loop through all the rows that were found
{
LINHA ERRO: weaponid = cache_get_row_int(i, 0, Connectmysql);
LINHA ERRO: ammo = cache_get_row_int(i, 1, Connectmysql);
if(!(0 <= weaponid <= 46)) // check if weapon is valid (should be)
{
printf("[info] Warning: OnLoadPlayerWeapons - Unknown weaponid '%d'. Skipping.", weaponid);
continue;
}
GivePlayerWeapon(playerid, weaponid, ammo);
}
return;
}
Quote:
D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(66 ![]() D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(670) : error 017: undefined symbol "cache_get_row" D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(671) : error 017: undefined symbol "cache_get_row" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |
entao eu coloquei assim:
PHP код:
forward OnLoadPlayerWeapons(playerid);
public OnLoadPlayerWeapons(playerid)
{
new
weaponid,
ammo;
LINHA ERRO: for(new i, j = cache_get_row_count(Connectmysql); i < j; i++) // loop through all the rows that were found
{
LINHA WARN: weaponid = cache_get_value_index_int(i, 0);
LINHA WARN: ammo = cache_get_value_index_int(i, 1);
if(!(0 <= weaponid <= 46)) // check if weapon is valid (should be)
{
printf("[info] Warning: OnLoadPlayerWeapons - Unknown weaponid '%d'. Skipping.", weaponid);
continue;
}
GivePlayerWeapon(playerid, weaponid, ammo);
}
return;
}
Quote:
D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(66 ![]() D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(670) : warning 202: number of arguments does not match definition D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(671) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |