hlmod.hu
https://hlmod.hu/

zp class hiba
https://hlmod.hu/viewtopic.php?f=9&t=27904
Oldal: 1 / 1

Szerző:  pixxa112 [ 2017.07.07. 04:48 ]
Hozzászólás témája:  zp class hiba

Hali.

Az ilyen sorokat miért jelzi mindig hibásnak?

  1. if(!zp_core_is_zombie(id) && (Gamemode != g_GameModeSurvivorID) && (zp_class_human_get_current(id) == g_HumanClassID))

Szerző:  qkly [ 2017.07.07. 08:53 ]
Hozzászólás témája:  Re: zp class hiba

pixxa112 írta:
Hali.

Az ilyen sorokat miért jelzi mindig hibásnak?

  1. if(!zp_core_is_zombie(id) && (Gamemode != g_GameModeSurvivorID) && (zp_class_human_get_current(id) == g_HumanClassID))


inc?

Szerző:  pixxa112 [ 2017.07.07. 13:01 ]
Hozzászólás témája:  Re: zp class hiba

  1. #if defined _zp50_core_included
  2.   #endinput
  3. #endif
  4. #define _zp50_core_included
  5.  
  6. #include <zp50_core_const>
  7.  
  8. #if AMXX_VERSION_NUM >= 175
  9.     #pragma reqlib zp50_core
  10.     #if !defined AMXMODX_NOAUTOLOAD
  11.         #pragma loadlib zp50_core
  12.     #endif
  13. #else
  14.     #pragma library zp50_core
  15. #endif
  16.  
  17. /**
  18.  * Returns whether a player is a zombie.
  19.  *
  20.  * @param id        Player index.
  21.  * @return          True if it is, false otherwise.
  22.  */
  23. native zp_core_is_zombie(id)
  24.  
  25. /**
  26.  * Returns whether a player is the first zombie.
  27.  *
  28.  * @param id        Player index.
  29.  * @return          True if it is, false otherwise.
  30.  */
  31. native zp_core_is_first_zombie(id)
  32.  
  33. /**
  34.  * Returns whether a player is the last zombie.
  35.  *
  36.  * @param id        Player index.
  37.  * @return          True if it is, false otherwise.
  38.  */
  39. native zp_core_is_last_zombie(id)
  40.  
  41. /**
  42.  * Returns whether a player is the last human.
  43.  *
  44.  * @param id        Player index.
  45.  * @return          True if it is, false otherwise.
  46.  */
  47. native zp_core_is_last_human(id)
  48.  
  49. /**
  50.  * Returns number of alive zombies.
  51.  *
  52.  * @return      Zombie count.
  53.  */
  54. native zp_core_get_zombie_count()
  55.  
  56. /**
  57.  * Returns number of alive humans.
  58.  *
  59.  * @return      Human count.
  60.  */
  61. native zp_core_get_human_count()
  62.  
  63. /**
  64.  * Turns a player into a zombie.
  65.  *
  66.  * @param id        Player index to be infected.
  67.  * @param attacker  Player who triggered the infection. (optional)
  68.  * @return          True on success, false otherwise.
  69.  */
  70. native zp_core_infect(id, attacker = 0)
  71.  
  72. /**
  73.  * Turns a player into a human.
  74.  *
  75.  * @param id        Player index to be cured.
  76.  * @param attacker  Player who triggered the cure. (optional)
  77.  * @return          True on success, false otherwise.
  78.  */
  79. native zp_core_cure(id, attacker = 0)
  80.  
  81. /**
  82.  * Forces a player to become a zombie/human.
  83.  *
  84.  * Note: use this only when previous checks need to be skipped.
  85.  *
  86.  * @param id        Player index to be infected/cured.
  87.  * @return          True on success, false otherwise.
  88.  */
  89. native zp_core_force_infect(id)
  90. native zp_core_force_cure(id)
  91.  
  92. /**
  93.  * Sets whether the player will be respawned as zombie or human.
  94.  *
  95.  * @param id            Player index.
  96.  * @param zombie        True to respawn as zombie, false otherwise.
  97.  */
  98. native zp_core_respawn_as_zombie(id, zombie = true)
  99.  
  100. /**
  101.  * Called when a player gets infected.
  102.  *
  103.  * @param id        Player index who was infected.
  104.  * @param attacker  Player who triggered the infection.
  105.  *                  (0 if not available, id = attacker if he infected himself)
  106.  */
  107. forward zp_fw_core_infect(id, attacker)
  108. forward zp_fw_core_infect_post(id, attacker)
  109.  
  110. /**
  111.  * Called when a player turns back to human.
  112.  *
  113.  * @param id        Player index who was cured.
  114.  * @param attacker  Player who triggered the cure.
  115.  *                  (0 if not available, id = attacker if he cured himself)
  116.  */
  117. forward zp_fw_core_cure(id, attacker)
  118. forward zp_fw_core_cure_post(id, attacker)
  119.  
  120. /**
  121.  * Called on a player infect/cure attempt. You can block it by
  122.  * returning PLUGIN_HANDLED in your plugin.
  123.  *
  124.  * @param id        Player index who is being infected/cured.
  125.  * @param attacker  Player who is triggering the infection/cure.
  126.  *                  (0 if not available, id = attacker if he is infecting/curing himself)
  127.  */
  128. forward zp_fw_core_infect_pre(id, attacker)
  129. forward zp_fw_core_cure_pre(id, attacker)
  130.  
  131. /**
  132.  * Called when a player becomes the last zombie/human.
  133.  *
  134.  * Note: This is called for the first zombie too.
  135.  *
  136.  * @param id        Player index.
  137.  */
  138. forward zp_fw_core_last_zombie(id)
  139. forward zp_fw_core_last_human(id)
  140.  
  141. /**
  142.  * Called when a player spawns, before applying human/zombie attributes to him.
  143.  *
  144.  * @param id        Player index.
  145.  */
  146. forward zp_fw_core_spawn_post(id)

Szerző:  Metal [ 2017.07.07. 14:17 ]
Hozzászólás témája:  Re: zp class hiba

Mi a hiba?

Szerző:  pixxa112 [ 2017.07.07. 14:21 ]
Hozzászólás témája:  Re: zp class hiba

Metal írta:
Mi a hiba?


Azt a sort írja hibának.
De le írom a logot:

  1. L 07/07/2017 - 14:12:08: [AMXX] Displaying debug trace (plugin "zp50_class_human_leon.amxx")
  2. L 07/07/2017 - 14:12:08: [AMXX] Run time error 10: native error (native "zp_core_is_zombie")
  3. L 07/07/2017 - 14:12:08: [AMXX] [0] Untitled.sma::zp_fw_gamemodes_start (line 39)
  4. L 07/07/2017 - 14:17:31: [ZP] Invalid Player (2)

Szerző:  qkly [ 2017.07.07. 15:02 ]
Hozzászólás témája:  Re: zp class hiba

pixxa112 írta:
Metal írta:
Mi a hiba?


Azt a sort írja hibának.
De le írom a logot:

  1. L 07/07/2017 - 14:12:08: [AMXX] Displaying debug trace (plugin "zp50_class_human_leon.amxx")
  2. L 07/07/2017 - 14:12:08: [AMXX] Run time error 10: native error (native "zp_core_is_zombie")
  3. L 07/07/2017 - 14:12:08: [AMXX] [0] Untitled.sma::zp_fw_gamemodes_start (line 39)
  4. L 07/07/2017 - 14:17:31: [ZP] Invalid Player (2)


39. sorban van valami. Próbáld meg a debug-ot és nézd meg utána mi van.

Kód:
(line 39)

Szerző:  pixxa112 [ 2017.07.07. 15:14 ]
Hozzászólás témája:  Re: zp class hiba

Ez már maga a debug..
És tudom h a 39. sorban van a hiba. Ami pontosan ez:

  1. if(!zp_core_is_zombie(id) || (Gamemode != g_GameModeSurvivorID) || (zp_class_human_get_current(id) == g_HumanClassID))


  1. L 07/07/2017 - 14:12:08: [AMXX] Displaying debug trace (plugin "zp50_class_human_leon.amxx")
  2. L 07/07/2017 - 14:12:08: [AMXX] Run time error 10: native error (native "zp_core_is_zombie")
  3. L 07/07/2017 - 14:12:08: [AMXX] [0] Untitled.sma::zp_fw_gamemodes_start (line 39)
  4. L 07/07/2017 - 14:17:31: [ZP] Invalid Player (2)

Szerző:  DeteCT0R [ 2017.07.07. 15:14 ]
Hozzászólás témája:  Re: zp class hiba

Kód:
if(!zp_core_is_zombie(id) && (Gamemode != g_GameModeSurvivorID) && (zp_class_human_get_current(id) == g_HumanClassID))

Csekkold le a kod elott hogy az emberke csatlakozva van-e.

Szerző:  pixxa112 [ 2017.07.07. 15:17 ]
Hozzászólás témája:  Re: zp class hiba

DeteCT0R írta:
Kód:
if(!zp_core_is_zombie(id) && (Gamemode != g_GameModeSurvivorID) && (zp_class_human_get_current(id) == g_HumanClassID))

Csekkold le a kod elott hogy az emberke csatlakozva van-e.


Még mindig ugyan az a hiba.

UI:

MEGOLDVA!

if(!is_user_connected(id)) continue;
if(!zp_core_is_zombie(id) && (Gamemode != g_GameModeSurvivorID) && (zp_class_human_get_current(id) == g_HumanClassID))

Szerző:  qkly [ 2017.07.07. 15:54 ]
Hozzászólás témája:  Re: zp class hiba

pixxa112 írta:
Ez már maga a debug..
És tudom h a 39. sorban van a hiba. Ami pontosan ez:

  1. if(!zp_core_is_zombie(id) || (Gamemode != g_GameModeSurvivorID) || (zp_class_human_get_current(id) == g_HumanClassID))


  1. L 07/07/2017 - 14:12:08: [AMXX] Displaying debug trace (plugin "zp50_class_human_leon.amxx")
  2. L 07/07/2017 - 14:12:08: [AMXX] Run time error 10: native error (native "zp_core_is_zombie")
  3. L 07/07/2017 - 14:12:08: [AMXX] [0] Untitled.sma::zp_fw_gamemodes_start (line 39)
  4. L 07/07/2017 - 14:17:31: [ZP] Invalid Player (2)


Bocsi, más tippem nem volt.

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/