hlmod.hu
https://hlmod.hu/

Fordítás probléma.
https://hlmod.hu/viewtopic.php?f=9&t=11481
Oldal: 1 / 1

Szerző:  xXLegendXx [ 2013.10.30. 23:13 ]
Hozzászólás témája:  Fordítás probléma.

Sziasztok!
Ez van benne a pluginban:
strip_user_weapons(id);
give_item(id, "weapon_knife");
Ezt nem engedi fordítani, ezt írja:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

teszt.sma(38) : warning 213: tag mismatch
teszt.sma(53) : error 017: undefined symbol "id"
teszt.sma(53) : error 088: number of arguments does not match definition
teszt.sma(54) : error 017: undefined symbol "id"
teszt.sma(54) : warning 215: expression has no effect
teszt.sma(54) : error 001: expected token: ";", but found ")"
teszt.sma(54) : error 029: invalid expression, assumed zero
teszt.sma(54) : fatal error 107: too many error messages on one line

Compilation aborted.
6 Errors.
Could not locate output file teszt.amx (compile failed).
Mi lehet a gond?

Szerző:  fear_ezmegmi [ 2013.10.31. 03:07 ]
Hozzászólás témája:  Re: Fordítás probléma.

adj forráskódot.

Szerző:  xXLegendXx [ 2013.10.31. 08:03 ]
Hozzászólás témája:  Re: Fordítás probléma.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <amxmisc>
  4. #include <cstrike>
  5. #include <colorchat>
  6. #include <hamsandwich>
  7. #include <fakemeta>
  8. #define PLUGIN "teszt"
  9. #define VERSION "1.0"
  10. #define AUTHOR "xXLegendXx"
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_logevent("Round_End",2,"1=Round_End")
  15. register_logevent("Round_Start",2, "1=Round_Start")
  16. }
  17.  
  18. public Round_End()
  19. {
  20. new CsTeams:team
  21. new player
  22. team=cs_get_user_team(player)
  23. if(team==CS_TEAM_T)
  24. {
  25. cs_set_user_team(player, CS_TEAM_CT)
  26. }
  27. else
  28. {
  29. if(team==CS_TEAM_CT)
  30. {
  31. new players[32], pnum, r_player
  32. get_players(players, pnum)
  33. r_player = players[random(pnum)]
  34. cs_set_user_team(player, CS_TEAM_T)
  35. set_user_health(r_player, 300)
  36. set_user_gravity(r_player, 0.5)
  37. set_user_maxspeed(r_player, 800)
  38. new r_name[30]
  39. get_user_info(r_player, "name", r_name, 29)
  40. ColorChat(0, BLUE, "[Dream] | %s szuper képességeket kapott!", r_name)
  41. }
  42. }
  43. }
  44.  
  45. public Round_Start()
  46. {
  47. new CsTeams:team
  48. new player
  49. team=cs_get_user_team(player)
  50. if(team==CS_TEAM_T)
  51. {
  52. strip_user_weapons(id);
  53. give_item(id, "weapon_knife");
  54. }
  55. else
  56. {
  57. }
  58. }
  59.  

Itt a forráskód

Szerző:  CrB [ 2013.10.31. 13:32 ]
Hozzászólás témája:  Re: Fordítás probléma.

tessék
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3. #include <fun>
  4. #include <amxmisc>
  5. #include <cstrike>
  6. #include <colorchat>
  7.  
  8. #define PLUGIN "teszt"
  9. #define VERSION "1.0"
  10. #define AUTHOR "xXLegendXx"
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_logevent("Round_End",2,"1=Round_End")
  15. register_logevent("Round_Start",2, "1=Round_Start")
  16. }
  17.  
  18. public Round_End()
  19. {
  20. new CsTeams:team
  21. new players[32], num, i
  22. get_players(players, num, "ch")
  23. for(i = 0; i<num; i++)
  24. {
  25. new id = players[i]
  26. team = cs_get_user_team(id)
  27. if(team==CS_TEAM_T)
  28. {
  29. cs_set_user_team(id, CS_TEAM_CT)
  30. }
  31. else
  32. {
  33. if(team==CS_TEAM_CT)
  34. {
  35. new players[32], pnum, r_player
  36. get_players(players, pnum)
  37. r_player = players[random(pnum)]
  38. cs_set_user_team(r_player, CS_TEAM_T)
  39. set_user_health(r_player, 300)
  40. set_user_gravity(r_player, 0.5)
  41. set_user_maxspeed(r_player, 800.0)
  42. new r_name[30]
  43. get_user_info(r_player, "name", r_name, 29)
  44. ColorChat(0, BLUE, "[Dream] | %s szuper kA©pessA©geket kapott!", r_name)
  45. }
  46. }
  47. }
  48. }
  49. public Round_Start()
  50. {
  51. new CsTeams:team
  52. new players[32], num, i
  53. get_players(players, num, "ch")
  54. for(i = 0; i<num; i++)
  55. {
  56. new id = players[i]
  57. team = cs_get_user_team(id)
  58. if(team==CS_TEAM_T)
  59. {
  60. strip_user_weapons(id);
  61. give_item(id, "weapon_knife");
  62. }
  63. else
  64. {
  65. }
  66. }
  67. }

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