AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem BANK (https://forums.alliedmods.net/showthread.php?t=217908)

Crizzatu 06-09-2013 06:37

Problem BANK
 
PHP Code:

public cmd_jb_bankset(idlevelcid) {
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED;
    else if(
g_Sql == Empty_Handle) {
        
console_print(id,"%s %L",PLUGIN_PREFIXLANG_PLAYER"BANK_ERR");
        return 
PLUGIN_HANDLED;
    }
    
    new 
player_name[32];
    new 
count[12],count_set;
    
    
read_argv(1,player_name,31);
    
read_argv(2,count,11);

    new 
player_id cmd_target(idplayer_nameCMDTARGET_ALLOW_SELF);
    if(!
player_id || !g_BankSqlOpened[player_id]) return PLUGIN_HANDLED;
    
    
count_set str_to_num(count);
    
    new 
admin_name[32];
    
get_user_name(id,admin_name,31);
    
    if(
get_pcvar_num(g_cvar_auto_load_on_connect)) set_cranii(player_id,count_set);
    else 
g_BankSql[player_id] = count_set;
    
    
log_to_file("jb_bank_logs.log","admin ^"%s^" give bone to ^"%s^" amount ^"%d^""admin_nameplayer_namecount_set);
    
    return 
PLUGIN_HANDLED;


I compile this and i have this error: number of arguments does not match definition and line is
PHP Code:

if(get_pcvar_num(g_cvar_auto_load_on_connect)) set_cranii(player_id,count_set); 

Ps: set_cranii is NATIVE INC :D

PHP Code:

public get_nativecranii(id)
    {
    return 
cranii[id]
}

public 
set_nativecranii(id,ammo)
    {
    
cranii[id] = ammo



YamiKaitou 06-09-2013 06:41

Re: Problem BANK
 
Show us the include file


All times are GMT -4. The time now is 16:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.