native error

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
270
Реакции
43
Помог
5 раз(а)
Ошибка
L 07/26/2019 - 22:21:57: Start of error session.
L 07/26/2019 - 22:21:57: Info (map "de_anarchy_csgo") (file "addons/amxmodx/logs/error_20190726.log")
L 07/26/2019 - 22:21:57: Invalid weapon id 0
L 07/26/2019 - 22:21:57: [AMXX] Displaying debug trace (plugin "rcsgo_rest_murz_4-40.amxx", version "4.82")
L 07/26/2019 - 22:21:57: [AMXX] Run time error 10: native error (native "get_weaponname")
L 07/26/2019 - 22:21:57: [AMXX] [0] rcsgo_rest_murz_4-40.sma::ResetSkin (line 3164)
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5377
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.6.0.672-dev
Build date: 17:31:06 Jun 5 2019 (1880)
ReGamedll
ReGameDLL version: 5.9.0.363-dev
Build date: 18:17:20 Jul 8 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/75bdc26
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
[ 1] Reunion               RUN   -    reunion_mm_i386.so          v0.1.0.133      ini  Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5377 ini Start ANY
[ 3] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 4] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 5] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 9] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[10] ReAPI RUN - reapi_amxx_i386.so v5.9.0.167-dev pl2 ANY Never
[11] MySQL RUN - mysql_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[15] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[16] CSX RUN - csx_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[17] Engine RUN - engine_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
[18] Fun RUN - fun_amxx_i386.so v1.10.0.5377 pl2 ANY ANY
Список плагинов
[  8] Advert Messages         1.22        neygomon          adverts.amxx     running
[ 9] Admin Commands 1.10.0.525 AMXX Dev Team admincmd.amxx running
[ 10] Multi-Lingual System 1.10.0.525 AMXX Dev Team multilingual.am running
[ 11] Menus Front-End 1.9.0.5232 AMXX Dev Team menufrontv2_cli running
[ 12] Commands Menu 1.10.0.525 AMXX Dev Team cmdmenu.amxx running
[ 13] Players Menu 1.10.0.525 AMXX Dev Team plmenu.amxx running
[ 14] Teleport Menu 1.10.0.525 AMXX Dev Team telemenu.amxx running
[ 15] Maps Menu 1.10.0.525 AMXX Dev Team mapsmenu.amxx running
[ 16] Admin Chat 1.10.0.525 AMXX Dev Team adminchat.amxx running
[ 17] Anti Flood 1.10.0.525 AMXX Dev Team antiflood.amxx running
[ 18] Admin Votes 1.10.0.525 AMXX Dev Team adminvote.amxx running
[ 19] Nextmap Chooser 1.10.0.525 AMXX Dev Team mapchooser.amxx running
[ 20] Stats Configuration 1.10.0.525 AMXX Dev Team statscfg.amxx running
[ 21] HLstatsX CE Ingame Plu 1.6.19 (HL psychonic hlstatsx_comman running
[ 22] Supply Crates 2.0 TBagT supply_box.amxx running
[ 23] TutorText 0.0.1 ConnorMcLeod cztutors.amxx running
[ 24] Global Offensive 4.82 Psychical rcsgo_rest_murz debug
[ 25] Items Restrict 1.0 s1lent items_restrict. running
[ 26] [ReAPI] resetscore 1.0 Phantom resetscore.amxx running
[ 27] Bullet Damage 0.0.1 ConnorMcLeod bullet_damage.a running
[ 28] Demo Recorder 2.4.0 F@nt0M demo_recorder.a running
[ 29] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 30] unknown unknown unknown sub_models_2.am running
[ 31] C4 Timer on roundtime 0.3.3a neygomon c4timer.amxx running
[ 32] [ReAPI] Block 'Fire in 0.0.1 sergrib reapi_block_FIT running
[ 33] [ReAPI] Parachute 1.1 ReHLDS Team parasiutas.amxx running
[ 34] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 35] Advanced Kill Assists 0.9 Spection next21_kill_ass running
[ 36] Christmas hat 0.3 AMXX.Shop christmas_hat_r running
[ 37] unknown unknown unknown cott.amxx running
[ 38] unknown unknown unknown csteam_bonus_a2 debug
[ 39] Lite Admin ESP 1.1 neygomon, AcE admin_esp.amxx running
[ 40] Map Manager: Core 3.0.4 Mistrick map_manager_cor running
[ 41] Map Manager: Scheduler 0.1.3 Mistrick map_manager_sch running
[ 42] Map Manager: Rtv 0.1.0 Mistrick map_manager_rtv running
[ 43] Map Manager: Nominatio 0.1.0 Mistrick map_manager_nom debug
[ 44] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 45] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 46] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 47] [ReVIP] System Core 2.5 full pUzzlik re_vip_core.amx running
[ 48] [ReVIP] Menu 2.5 full pUzzlik re_vip_menu.amx running
[ 49] [ReVIP] Add HP 2.3 free pUzzlik re_vip_hp_add.a running
Автор плагина
rez
Версия плагина
4.82
Исходный код
public ResetSkin(id)
{
new szWeapon[32];
get_weaponname(get_user_weapon(id), szWeapon, 31);
replace_all(szWeapon, charsmax(szWeapon), "weapon_", "v_");

if(is_user_connected(id) && is_user_alive(id))
{
new DefaultPath[128];
formatex(DefaultPath, sizeof(DefaultPath), "models/%s.mdl", szWeapon);
set_pev(id, pev_viewmodel2, DefaultPath);
}
}
.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
38
Реакции
29
Помог
4 раз(а)
@return Weapon index on success [B]or 0 if the client is not connected[/B]
 
  • Нравится
Реакции: Murz
Сообщения
38
Реакции
29
Помог
4 раз(а)
C++:
if(!is_user_connected(id))
        return;
Murz, maybe or check on 0

The error lies in the fact that you check on the connection, after calling the function
get_user_weapon
 
Последнее редактирование:
  • Нравится
Реакции: Murz
Сообщения
2,143
Реакции
1,225
Помог
44 раз(а)
Murz,
Код:
public ResetSkin(id)
{
++    (!is_user_alive(id)) {
++        return;
++    }
    
    new szWeapon[32];
    get_weaponname(get_user_weapon(id), szWeapon, 31);
    replace_all(szWeapon, charsmax(szWeapon), "weapon_", "v_");
    
--    if(is_user_connected(id) && is_user_alive(id))
--    {       
    new DefaultPath[128];
    formatex(DefaultPath, sizeof(DefaultPath), "models/%s.mdl", szWeapon);
    set_pev(id, pev_viewmodel2, DefaultPath);
--    }
}
 
Сообщения
270
Реакции
43
Помог
5 раз(а)
Murz,
Код:
public ResetSkin(id)
{
++    (!is_user_alive(id)) {
++        return;
++    }
  
    new szWeapon[32];
    get_weaponname(get_user_weapon(id), szWeapon, 31);
    replace_all(szWeapon, charsmax(szWeapon), "weapon_", "v_");
  
--    if(is_user_connected(id) && is_user_alive(id))
--    {     
    new DefaultPath[128];
    formatex(DefaultPath, sizeof(DefaultPath), "models/%s.mdl", szWeapon);
    set_pev(id, pev_viewmodel2, DefaultPath);
--    }
}
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// rcsgo_rest_murz_4-41.sma
//
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3163) : er
ror 028: invalid subscript (not an array or too many subscripts): "is_user_alive
"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3163 -- 31
64) : error 001: expected token: "}", but found "return"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3164) : wa
rning 217: loose indentation
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3168) : er
ror 021: symbol already defined: "get_weaponname"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3169) : er
ror 001: expected token: ")", but found "sizeof"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3169) : er
ror 021: symbol already defined: "replace_all"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3169) : wa
rning 215: expression has no effect
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3169) : er
ror 001: expected token: ";", but found ")"
// C:\Users\Lina\Desktop\scripting\scripting\rcsgo_rest_murz_4-41.sma(3169) : fa
tal error 107: too many error messages on one line
//
// Compilation aborted.
// 7 Errors.
// Could not locate output file C:\Users\Lina\Desktop\scripting\scripting\compil
ed\rcsgo_rest_murz_4-41.amx (compile failed).
//
// Compilation Time: 5,02 sec
// ----------------------------------------

Press enter to exit ...

C++:
public ResetSkin(id)
{
    (!is_user_alive(id)) {
        return;
    }
   
    new szWeapon[32];
    get_weaponname(get_user_weapon(id), szWeapon, 31);
    replace_all(szWeapon, charsmax(szWeapon), "weapon_", "v_");
     
    new DefaultPath[128];
    formatex(DefaultPath, sizeof(DefaultPath), "models/%s.mdl", szWeapon);
    set_pev(id, pev_viewmodel2, DefaultPath);
}
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Murz,

Код:
public ResetSkin(id)
{
    if(!is_user_alive(id))
        return;

    new szWeapon[32];
    get_weaponname(get_user_weapon(id), szWeapon, charsmax(szWeapon));
    replace_all(szWeapon, charsmax(szWeapon), "weapon_", "v_");

    new szPath[128];
    formatex(szPath, charsmax(szPath), "models/%s.mdl", szWeapon);
    set_pev(id, pev_viewmodel2, szPath);
}
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу