hlmod.hu
https://hlmod.hu/

Rang lekérés.
https://hlmod.hu/viewtopic.php?f=24&t=20921
Oldal: 1 / 1

Szerző:  Zeu|Sz [ 2015.06.08. 23:50 ]
Hozzászólás témája:  Rang lekérés.

Üdv.Ez így miért nem jó?

SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. new szint[33], oles[33]
  3.  
  4. new const szam[17] =
  5. {
  6. 50,
  7. 100,
  8. 200,
  9. 300,
  10. 500,
  11. 750,
  12. 1000,
  13. 1300,
  14. 1500,
  15. 2000,
  16. 2500,
  17. 3000,
  18. 4000,
  19. 5000,
  20. 6500,
  21. 8000,
  22. 10000
  23. }
  24. new const rang[17+1][] =
  25. {
  26. "Silver I",
  27. "Silver II",
  28. "Silver III",
  29. "Silver IV",
  30. "Silver Elite",
  31. "Silver Elite Master",
  32. "Gold Nova I",
  33. "Gold Nova II",
  34. "Gold Nova III",
  35. "Gold Nova Master",
  36. "Master Guardian I",
  37. "Master Guardian II",
  38. "Master Guardian Elite",
  39. "Distinguished Master Guardian",
  40. "Legendary Eagle",
  41. "Legendary Eagle Master",
  42. "Supreme Master First Class",
  43. "The Global Elite"
  44. }
  45.  
  46.  
  47. public mutato(id)
  48. {
  49. new kovetkezo = rang[szint[id]]+1
  50. set_hudmessage(random(255), random(255), random(255), -1.0, 0.00, 0, 1.0, 1.0, 0.1, 0.2, 13)
  51. show_hudmessage(0, "Következő Rang: %d | Kell Még: %d", kovetkezo, szam[szint[id]]-oles[id])
  52. }


Death:
Kód:
while(oles[gyilkos] >= szam[szint[gyilkos]])
{
szint[gyilkos]++
}


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

Error: Array must be indexed (variable "rang") on line 138
Error: Invalid subscript (not an array or too many subscripts): "szam" on line 305
Warning: Expression has no effect on line 305
Error: Expected token: ";", but found "]" on line 305
Error: Invalid expression, assumed zero on line 305
Error: Too many error messages on one line on line 305

Compilation aborted.
5 Errors.
Could not locate output file C:\Documents and Settings\Norbi.ETERNITYV2\Asztal\GUD.amx (compile failed).

Szerző:  ExE [ 2015.06.09. 10:18 ]
Hozzászólás témája:  Re: Rang lekérés.

Zeu|Sz írta:
Üdv.Ez így miért nem jó?

SMA Forráskód: [ Mindet kijelol ] 
new szint[33], oles[33]
 
new const szam[17] =
{
50,
100,
200,
300,
500,
750,
1000,
1300,
1500,
2000,
2500,
3000,
4000,
5000,
6500,
8000,
10000
}
new const rang[17+1][] =
{
"Silver I",
"Silver II",
"Silver III",
"Silver IV",
"Silver Elite",
"Silver Elite Master",
"Gold Nova I",
"Gold Nova II",
"Gold Nova III",
"Gold Nova Master",
"Master Guardian I",
"Master Guardian II",
"Master Guardian Elite",
"Distinguished Master Guardian",
"Legendary Eagle",
"Legendary Eagle Master",
"Supreme Master First Class",
"The Global Elite"
}
 
 
public mutato(id)
{
new kovetkezo = rang[szint[id]]+1
set_hudmessage(random(255), random(255), random(255), -1.0, 0.00, 0, 1.0, 1.0, 0.1, 0.2, 13)
show_hudmessage(0, "Következő Rang: %d | Kell Még: %d", kovetkezo, szam[szint[id]]-oles[id])
}

Death:
Kód:
while(oles[gyilkos] >= szam[szint[gyilkos]])
{
szint[gyilkos]++
}


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

Error: Array must be indexed (variable "rang") on line 138
Error: Invalid subscript (not an array or too many subscripts): "szam" on line 305
Warning: Expression has no effect on line 305
Error: Expected token: ";", but found "]" on line 305
Error: Invalid expression, assumed zero on line 305
Error: Too many error messages on one line on line 305

Compilation aborted.
5 Errors.
Could not locate output file C:\Documents and Settings\Norbi.ETERNITYV2\Asztal\GUD.amx (compile failed).

Küld egy tejes forráskódot!

Szerző:  adamka77 [ 2015.06.09. 10:35 ]
Hozzászólás témája:  Re: Rang lekérés.

Próbáld meg úgy, hogy így használod
SMA Forráskód: [ Mindet kijelol ]
  1. #define Rangok 17

SMA Forráskód: [ Mindet kijelol ]
  1. new const szam[Rangok] = {


SMA Forráskód: [ Mindet kijelol ]
  1. new const rang[Rangok+1][] = {

Szerző:  Zeu|Sz [ 2015.06.09. 12:09 ]
Hozzászólás témája:  Re: Rang lekérés.

MEGOLDVA.MEHET KUKA.

Szerző:  oroszrulett [ 2015.06.09. 12:17 ]
Hozzászólás témája:  Re: Rang lekérés.

Zeu|Sz írta:
MEGOLDVA.MEHET KUKA.


Rendben.

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