[Ajuda] Salvar weapons mysql
#1

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:
PHP код:
public OnLoadPlayerWeapons(playerid)
{
    new
        
weaponid,
        
ammo;
    
LINHA ERRO:         for(new icache_get_row_count(Connectmysql); ji++) // loop through all the rows that were found
    
{
LINHA ERRO:           weaponid     cache_get_row_int(i0Connectmysql);
LINHA ERRO:             ammo        cache_get_row_int(i1Connectmysql);
        
        if(!(
<= weaponid <= 46)) // check if weapon is valid (should be)
        
{
            
printf("[info] Warning: OnLoadPlayerWeapons - Unknown weaponid '%d'. Skipping."weaponid);
            continue;
        }
        
        
GivePlayerWeapon(playeridweaponidammo); 
    }
    return;

da esses erros:
Quote:

D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(66 : warning 213: tag mismatch
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 icache_get_row_count(Connectmysql); ji++) // loop through all the rows that were found
    
{
LINHA WARN:             weaponid     cache_get_value_index_int(i0);
LINHA WARN:             ammo        cache_get_value_index_int(i1);
        if(!(
<= weaponid <= 46)) // check if weapon is valid (should be)
        
{
            
printf("[info] Warning: OnLoadPlayerWeapons - Unknown weaponid '%d'. Skipping."weaponid);
            continue;
        }
        
GivePlayerWeapon(playeridweaponidammo);
    }
    return;

e deu esses warnings:
Quote:

D:\samp037_svr_R2-1-1_win32\gamemodes\survive1.pwn(66 : warning 213: tag mismatch
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

OBS: Eu deixei as linhas do erros/warns marcadas com "LINHAS ERROS/WARNS:"
Reply


Messages In This Thread
Salvar weapons mysql - by PedroH - 19.08.2017, 03:24
Re: Salvar weapons mysql - by GuilhermeNunes - 19.08.2017, 04:23
Re: Salvar weapons mysql - by PedroH - 19.08.2017, 12:41
Re: Salvar weapons mysql - by CezarBR - 19.08.2017, 13:01
Re: Salvar weapons mysql - by PedroH - 19.08.2017, 15:13
Re: Salvar weapons mysql - by IlanZ - 19.08.2017, 16:39
Re: Salvar weapons mysql - by GuilhermeNunes - 19.08.2017, 16:45
Re: Salvar weapons mysql - by PedroH - 20.08.2017, 01:57
Re: Salvar weapons mysql - by Kadett990 - 20.08.2017, 04:28
Re: Salvar weapons mysql - by GuilhermeNunes - 20.08.2017, 04:31

Forum Jump:


Users browsing this thread: 2 Guest(s)