Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Dr.PaLaCz - zdjęcie

Dr.PaLaCz

Rejestracja: 22.09.2011
Aktualnie: Nieaktywny
Poza forum Ostatnio: 24.11.2011 16:00
-----

Moje posty

W temacie: [ROZWIĄZANE] Problem [argument type mismatch (argument 2)]

02.11.2011 21:04

Pod

#include <amxmodx>
daj
#include <amxmisc>


Pomogło,problem rozwiązany,można zamknąć ;]
Dzięki za wszystko.

W temacie: [ROZWIĄZANE] Problem [argument type mismatch (argument 2)]

02.11.2011 19:38

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)


register_clcmd("say /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say /shop", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /shop", "Sklep",  ADMIN_LEVEL_H);


zamien na

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)


register_clcmd("say /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say /shop", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /shop", "Sklep",  ADMIN_LEVEL_H);

}

Dalej błędy,ale już lepiej.

/tmp/textFGrDnH.sma(30) : error 017: undefined symbol "cmd_access"
/tmp/textFGrDnH.sma(42) : warning 209: function "Sklep" should return a value

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textFGrDnH.amx (compile failed).
Całość sma wygląda tak:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>

#define PLUGIN "Pb Shop"
#define VERSION "1.0"
#define AUTHOR "[AvP] ELOS"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)


register_clcmd("say /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say /shop", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /shop", "Sklep",  ADMIN_LEVEL_H);

}



public Sklep(id, level, cid)
{

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED

new tytul[25];
format(tytul, 24, "Sklep Paintball VIP");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Granat Wybuchowy Koszt: 5000$");//1
menu_additem(menu, "Wyrzutnia Granatow Koszt: 14000$");//2
menu_additem(menu, "Granat Dymny Koszt: 4000$");//3
menu_additem(menu, "Super Marker Koszt: 6000$");//4
menu_display(id, menu);

}
public Sklep_Handler(id, menu, item)

{

if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;

new kasa = cs_get_user_money(id);

if(item == MENU_EXIT)



{
menu_destroy(menu);
return PLUGIN_CONTINUE;



}

switch(item)



{
case 0:



{
if(kasa >= 5000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-5000);
give_item(id, "weapon_hegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Wybuchowy!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 1:



{
if(kasa >= 14000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-14000);
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
client_print(id, print_chat, "[Sklep] Kupiles Wyrzutnie Granatow posiadasz 2 ladunki!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 2:



{
if(kasa >= 4000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-4000);
give_item(id, "weapon_smokegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Dymny!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 3:



{
if(kasa >= 6000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-6000);
give_item(id, "weapon_p90")
give_item(id, "weapon_primammo");
give_item(id, "weapon_primammo");
client_print(id, print_chat, "[Sklep] Kupiles Super Marker!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}




}

return PLUGIN_CONTINUE;

}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*

{
rtf1 ansi deff0


{
fonttbl


{
f0 fnil Tahoma;


}


}
n viewkind4 uc1 pard lang1045 f0 fs16 n par

}
*/

W temacie: [ROZWIĄZANE] Problem [argument type mismatch (argument 2)]

02.11.2011 15:50

if(kasa >= 6000 && Tutaj wstaw Pobieranie flagi)

Else
Napisz : Nie masz kasy lub nie jestes vipem


Cały czas te błędy:

/tmp/textlbeIWj.sma(25) : error 029: invalid expression, assumed zero
/tmp/textlbeIWj.sma(25) : error 017: undefined symbol "Sklep"
/tmp/textlbeIWj.sma(25) : error 017: undefined symbol "level"
/tmp/textlbeIWj.sma(25) : fatal error 107: too many error messages on one line
Całość sma wygląda tak:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>

#define PLUGIN "Pb Shop"
#define VERSION "1.0"
#define AUTHOR "[AvP] ELOS"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)


register_clcmd("say /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say /shop", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /shop", "Sklep",  ADMIN_LEVEL_H);



public Sklep(id, level, cid)
{

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED

new tytul[25];
format(tytul, 24, "Sklep Paintball VIP");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Granat Wybuchowy Koszt: 5000$");//1
menu_additem(menu, "Wyrzutnia Granatow Koszt: 14000$");//2
menu_additem(menu, "Granat Dymny Koszt: 4000$");//3
menu_additem(menu, "Super Marker Koszt: 6000$");//4
menu_display(id, menu);

}
public Sklep_Handler(id, menu, item)

{

if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;

new kasa = cs_get_user_money(id);

if(item == MENU_EXIT)



{
menu_destroy(menu);
return PLUGIN_CONTINUE;



}

switch(item)



{
case 0:



{
if(kasa >= 5000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-5000);
give_item(id, "weapon_hegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Wybuchowy!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 1:



{
if(kasa >= 14000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-14000);
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
client_print(id, print_chat, "[Sklep] Kupiles Wyrzutnie Granatow posiadasz 2 ladunki!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 2:



{
if(kasa >= 4000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-4000);
give_item(id, "weapon_smokegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Dymny!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}
case 3:



{
if(kasa >= 6000 && ADMIN_LEVEL_H)



{
cs_set_user_money(id, kasa-6000);
give_item(id, "weapon_p90")
give_item(id, "weapon_primammo");
give_item(id, "weapon_primammo");
client_print(id, print_chat, "[Sklep] Kupiles Super Marker!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy,lub nie jestes Vipem!");



}




}

return PLUGIN_CONTINUE;

}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*

{
rtf1 ansi deff0


{
fonttbl


{
f0 fnil Tahoma;


}


}
n viewkind4 uc1 pard lang1045 f0 fs16 n par

}
*/

W temacie: [ROZWIĄZANE] Problem [argument type mismatch (argument 2)]

01.11.2011 21:48

Cały czas błędy.

/tmp/textcywgc6.sma(25) : error 029: invalid expression, assumed zero
/tmp/textcywgc6.sma(25) : error 017: undefined symbol "Sklep"
/tmp/textcywgc6.sma(25) : error 017: undefined symbol "level"
/tmp/textcywgc6.sma(25) : fatal error 107: too many error messages on one line
Plik sma wygląda tak.

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>

#define PLUGIN "Pb Shop"
#define VERSION "1.0"
#define AUTHOR "[AvP] ELOS"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)


register_clcmd("say /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /sklep", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say /shop", "Sklep",  ADMIN_LEVEL_H);
register_clcmd("say_team /shop", "Sklep",  ADMIN_LEVEL_H);



public Sklep(id, level, cid)
{

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED

new tytul[25];
format(tytul, 24, "Sklep Paintball VIP");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Granat Wybuchowy Koszt: 5000$");//1
menu_additem(menu, "Wyrzutnia Granatow Koszt: 14000$");//2
menu_additem(menu, "Granat Dymny Koszt: 4000$");//3
menu_additem(menu, "Super Marker Koszt: 6000$");//4
menu_display(id, menu);

}
public Sklep_Handler(id, menu, item)

{

if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;

new kasa = cs_get_user_money(id);

if(item == MENU_EXIT)



{
menu_destroy(menu);
return PLUGIN_CONTINUE;



}

switch(item)



{
case 0:



{
if(kasa >= 5000)



{
cs_set_user_money(id, kasa-5000);
give_item(id, "weapon_hegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Wybuchowy!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy!");



}
case 1:



{
if(kasa >= 14000)



{
cs_set_user_money(id, kasa-14000);
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
client_print(id, print_chat, "[Sklep] Kupiles Wyrzutnie Granatow posiadasz 2 ladunki!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy!");



}
case 2:



{
if(kasa >= 4000)



{
cs_set_user_money(id, kasa-4000);
give_item(id, "weapon_smokegrenade")
client_print(id, print_chat, "[Sklep] Kupiles Granat Dymny!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy!");



}
case 3:



{
if(kasa >= 6000)



{
cs_set_user_money(id, kasa-6000);
give_item(id, "weapon_p90")
give_item(id, "weapon_primammo");
give_item(id, "weapon_primammo");
client_print(id, print_chat, "[Sklep] Kupiles Super Marker!");



}


else
client_print(id, print_chat, "[Sklep] Masz za malo kasy!");



}




}

return PLUGIN_CONTINUE;

}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*

{
rtf1 ansi deff0


{
fonttbl


{
f0 fnil Tahoma;


}


}
n viewkind4 uc1 pard lang1045 f0 fs16 n par

}
*/

W temacie: [ROZWIĄZANE] Problem [argument type mismatch (argument 2)]

01.11.2011 21:09

zmień

public Sklep(id)
na
public Sklep(id, level, cid)
oraz na początku publicu daj

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED

Problem z komplikacją
public Sklep(id, level, cid)
{
    if (!cmd_access(id, level, cid, 2))
    return PLUGIN_HANDLED


}
A błędy to
/tmp/text1gYG9p.sma(25) : error 029: invalid expression, assumed zero
/tmp/text1gYG9p.sma(25) : error 017: undefined symbol "Sklep"
/tmp/text1gYG9p.sma(25) : error 017: undefined symbol "level"
/tmp/text1gYG9p.sma(25) : fatal error 107: too many error messages on one line