hlmod.hu
https://hlmod.hu/

Elrontottam de hol?
https://hlmod.hu/viewtopic.php?f=9&t=18779
Oldal: 1 / 1

Szerző:  bence2000 [ 2015.01.01. 11:04 ]
Hozzászólás témája:  Elrontottam de hol?

Ez az első pluginom, és nem tudom hogy pontos vesszőt hova rakhatok,már 2 órája próbálkozok kitalálni hol a hiba.
A webforditó ugyan arra a kódsorra irja hogy jó és rossz is.
Elsőnek lefuttatom letöltés,másodjára lefuttatom hibás forráskód.
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3. #include <amxmisc>
  4. #include <fun>
  5. #include <cstrike>
  6. #include <fakemate>
  7.  
  8. #define PLUGIN "Bolt"
  9. #define VERSION "1.0"
  10. #define AUTHOR "Bence"
  11.  
  12. new menu
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17. register_clcmd("say /weapon", "go_menu")
  18. register_clcmd("say /fegyver", "go_menu")
  19. {
  20. menu=menu_create("\Bolt \CFG by Bence", "func_menu");
  21. menu=additem( menu, "\M4A1+Desert \")
  22. menu=additem( menu, "\AK47+Desert \")
  23. menu=additem( menu, "\AWP+Desert \")
  24. }
  25. register_event("ResetHUD","reset","be");
  26. }
  27. public func_menu(id, menu, key)
  28. {
  29. key++
  30. new penz = cs_get_user_money(id);
  31.  
  32. if(key == 1)
  33. {
  34. if(penz >= 0)
  35. {
  36. give_item(id, "weapon_m4a1")
  37. give_item(id, "weapon_desert")
  38. cs_set_user_money(id, penz-0);
  39. client_print(id, print_chat, "Te kaptal egy M4A1-et es egy Desert Eagle-t");
  40. }
  41.  
  42. else
  43. {
  44. client_print(id, print_chat, "Sajnos nincs eleg penzed!");
  45. }
  46. }
  47.  
  48. if(key == 2)
  49. {
  50. if(penz >= 0)
  51. {
  52. give_item(id, "weapon_ak47")
  53. give_item(id, "weapon_desert")
  54. cs_set_user_money(id, penz-0);
  55. client_print(id, print_chat, "Te kaptal egy Ak47-et es egy Desert Eagle-t");
  56. }
  57.  
  58. else {
  59. client_print(id, print_chat,"Sajnos nincs eleg penzed!");
  60. }
  61. }
  62. if(key == 3)
  63. {
  64. if(penz >= 0)
  65. {
  66. give_item(id, "weapon_awp")
  67. give_item(id, "weapon_desert")
  68. cs_set_user_money(id, penz-0);
  69. client_print(id, print_chat, "Te kaptal egy AWP-t es egy Desert Eagle-t");
  70. }
  71.  
  72. else {
  73. client_print(id, print_chat, "Sajnos nincs eleg penzed!");
  74. }
  75. }
  76. return PLUGIN_HANDLED
  77. }
  78. public go_menu(id)
  79. {
  80. menu_display (id, menu);
  81. return PLUGIN_HANDLED
  82. }
  83. public reset(id)
  84. {
  85. client_print(id, print_chat, "Ird be /fegyver")
  86. }
  87.  

Szerző:  D3M0*~ [ 2015.01.01. 11:10 ]
Hozzászólás témája:  Re: Elrontottam de hol?

A Hiba :
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Cannot read from file: "fakemate" on line 5

Compilation aborted.
1 Error.
Could not locate output file C:\Users\User\Desktop\Titkos\AMXMODX\AMX Mod X\amxxstudio\BenceSzarja.amx (compile failed).

Szerző:  Zeei [ 2015.01.01. 13:31 ]
Hozzászólás témája:  Re: Elrontottam de hol?

eloszor is ez a hibas: fakemate
helyesen: fakemeta :)

Zeei írta:
eloszor is ez a hibas: fakemate
helyesen: fakemeta :)

meg oda menu_additem-et hasznalnek a menu=additem helyett:)

EDIT: Elnezest a duplaposztert... Vak vagyok vagy nem tudom es a szerkesztes helyett az idezesre mentem.

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