xjarn
04-25-2008, 09:51
hey i hope someone can help me with this
i get a error then i try complie it
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define TASK_TIME 3.0
new gMsg_SayText;
new awp_ammo, fiveseven_ammo, deagle_ammo, scout_ammo;
public plugin_init()
{
register_plugin("Plugin", "Version", "Author");
register_logevent("round_start", 2, "1=Round_Start");
awp_ammo = register_cvar("WC_awp_ammo", "1");
fiveseven_ammo = register_cvar("WC_fiveseven_ammo", "2");
deagle_ammo = register_cvar("WC_50ae_ammo", "1");
scout_ammo = register_cvar("WC_762nato_ammo", "0");
gMsg_SayText = get_user_msgid("SayText");
}
public round_start()
{
set_task(TASK_TIME, "give_stuff");
}
public give_stuff()
{
new players[32], num;
get_players(players, num, "ah");
new player;
new ammo;
for(new i = 0; i < num; i++)
{
player = players[i];
if(random_num(0, 100) <= 1)
{
ammo = get_pcvar_num(awp_ammo);
fm_give_item(player, "weapon_awp");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_fiveseven"), ammo);
print_green(player, "OMG! Lucky you.. you got a awp! (1% chance)", ammo);
new name[32];
get_user_name( player, name, 32);
print_green(0,"OMG! Watch out! someone just got a awp!", name);
}
if(random_num(0, 100) <= 13)
{
ammo = get_pcvar_num(fiveseven_ammo);
fm_give_item(player, "weapon_fiveseven");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_fiveseven"), ammo);
print_green(player, "Lucky you.. you got a fiveseven! (13% chance)");
}
if(random_num(0, 100) <= 6)
{
ammo = get_pcvar_num(deagle_ammo);
fm_give_item(player, "weapon_deagle");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_deagle"), ammo);
print_green(player, "Lucky you.. you got a deagle! (6% chance)");
}
if(random_num(0, 100) <= 3)
{
set_pev(player, pev_health, 125.0);
print_green(player, "Lucky you.. you got a healthpack with 25hp! (3% chance)");
}
if(random_num(0, 100) <= 14)
{
fm_give_item(player, "weapon_smokegrenade");
print_green(player, "Lucky you.. you got a Frostnade!(Seekers only) (14% chance)");
}
if(random_num(0, 100) <= 12)
{
cs_set_user_armor(player, 100, CS_ARMOR_VESTHELM);
print_green(player, "Lucky you.. you got a Kevlar and Helm! (12% chance)");
}
if(random_num(0, 100) <= 15)
{
ammo = get_pcvar_num(scout_ammo);
fm_give_item(player, "weapon_scout");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_scout"), ammo);
print_green(player, "Lucky you.. you got a scout to jump easier! (15% chance)");
}
if(random_num(0, 100) <= 2)
{
set_pev(player, pev_health, 200.0);
print_green(player, "Lucky you.. you got a healthpack with 100hp! (2% chance)");
}
if(random_num(0, 100) <= 14)
{
fm_give_item(player, "weapon_hegrenade");
print_green(player, "Lucky you.. you got a HE!");
}
if(random_num(0, 100) <= 3)
{
set_pev(player, pev_health, 50.0);
print_green(player, "Unlucky you.. you lost 50 hp! (3% chance)");
new name[32];
get_user_name( player, name, 32);
print_green(0, "HAHA Someone have 50 hp!", name);
}
if(random_num(0, 100) <= 1)
{
set_pev(player, pev_health, 1.0);
print_green(player, "Unlucky you.. you lost 99 hp (1% chance)");
new name[32];
get_user_name( player, name, 32);
print_green(0, "HAHA Someone have 1 hp!");
}
if(random_num(0, 100) <= 4)
{
cs_set_user_armor(player, 140)
print_green(player, "Lucky you.. u got 140 Kevlar and Helm! (4% chance)")
}
}
}
stock fm_give_item(index, const item[]) {
if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))
return 0
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item));
if (!pev_valid(ent))
return 0
new Float:origin[3]
pev(index, pev_origin, origin)
set_pev(ent, pev_origin, origin)
set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
dllfunc(DLLFunc_Spawn, ent)
new save = pev(ent, pev_solid)
dllfunc(DLLFunc_Touch, ent, index)
if (pev(ent, pev_solid) != save)
return ent
engfunc(EngFunc_RemoveEntity, ent)
return -1
}
stock fm_get_weapon_id(index, const weapon[])
{
new ent = -1;
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", weapon)) != 0)
{
if(index == pev(ent, pev_owner))
return ent;
}
return 0;
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
if(id && !is_user_connected(id)) return 0
static buffer[192]
buffer[0] = '^x04'
vformat(buffer[1],190, fmt,3)
message_begin(id ? MSG_ONE : MSG_ALL,gMsg_SayText,{0,0,0},id)
write_byte(id)
write_string(buffer)
message_end()
return 1
} /home/groups/amxmodx/tmp3/phpIxBhn7.sma(104) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(111) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(131) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(133) : error 088: number of arguments does not match definition
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpIxBhn7.amx (compile failed).
the error i get
i get a error then i try complie it
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define TASK_TIME 3.0
new gMsg_SayText;
new awp_ammo, fiveseven_ammo, deagle_ammo, scout_ammo;
public plugin_init()
{
register_plugin("Plugin", "Version", "Author");
register_logevent("round_start", 2, "1=Round_Start");
awp_ammo = register_cvar("WC_awp_ammo", "1");
fiveseven_ammo = register_cvar("WC_fiveseven_ammo", "2");
deagle_ammo = register_cvar("WC_50ae_ammo", "1");
scout_ammo = register_cvar("WC_762nato_ammo", "0");
gMsg_SayText = get_user_msgid("SayText");
}
public round_start()
{
set_task(TASK_TIME, "give_stuff");
}
public give_stuff()
{
new players[32], num;
get_players(players, num, "ah");
new player;
new ammo;
for(new i = 0; i < num; i++)
{
player = players[i];
if(random_num(0, 100) <= 1)
{
ammo = get_pcvar_num(awp_ammo);
fm_give_item(player, "weapon_awp");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_fiveseven"), ammo);
print_green(player, "OMG! Lucky you.. you got a awp! (1% chance)", ammo);
new name[32];
get_user_name( player, name, 32);
print_green(0,"OMG! Watch out! someone just got a awp!", name);
}
if(random_num(0, 100) <= 13)
{
ammo = get_pcvar_num(fiveseven_ammo);
fm_give_item(player, "weapon_fiveseven");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_fiveseven"), ammo);
print_green(player, "Lucky you.. you got a fiveseven! (13% chance)");
}
if(random_num(0, 100) <= 6)
{
ammo = get_pcvar_num(deagle_ammo);
fm_give_item(player, "weapon_deagle");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_deagle"), ammo);
print_green(player, "Lucky you.. you got a deagle! (6% chance)");
}
if(random_num(0, 100) <= 3)
{
set_pev(player, pev_health, 125.0);
print_green(player, "Lucky you.. you got a healthpack with 25hp! (3% chance)");
}
if(random_num(0, 100) <= 14)
{
fm_give_item(player, "weapon_smokegrenade");
print_green(player, "Lucky you.. you got a Frostnade!(Seekers only) (14% chance)");
}
if(random_num(0, 100) <= 12)
{
cs_set_user_armor(player, 100, CS_ARMOR_VESTHELM);
print_green(player, "Lucky you.. you got a Kevlar and Helm! (12% chance)");
}
if(random_num(0, 100) <= 15)
{
ammo = get_pcvar_num(scout_ammo);
fm_give_item(player, "weapon_scout");
cs_set_weapon_ammo(fm_get_weapon_id(player, "weapon_scout"), ammo);
print_green(player, "Lucky you.. you got a scout to jump easier! (15% chance)");
}
if(random_num(0, 100) <= 2)
{
set_pev(player, pev_health, 200.0);
print_green(player, "Lucky you.. you got a healthpack with 100hp! (2% chance)");
}
if(random_num(0, 100) <= 14)
{
fm_give_item(player, "weapon_hegrenade");
print_green(player, "Lucky you.. you got a HE!");
}
if(random_num(0, 100) <= 3)
{
set_pev(player, pev_health, 50.0);
print_green(player, "Unlucky you.. you lost 50 hp! (3% chance)");
new name[32];
get_user_name( player, name, 32);
print_green(0, "HAHA Someone have 50 hp!", name);
}
if(random_num(0, 100) <= 1)
{
set_pev(player, pev_health, 1.0);
print_green(player, "Unlucky you.. you lost 99 hp (1% chance)");
new name[32];
get_user_name( player, name, 32);
print_green(0, "HAHA Someone have 1 hp!");
}
if(random_num(0, 100) <= 4)
{
cs_set_user_armor(player, 140)
print_green(player, "Lucky you.. u got 140 Kevlar and Helm! (4% chance)")
}
}
}
stock fm_give_item(index, const item[]) {
if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))
return 0
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item));
if (!pev_valid(ent))
return 0
new Float:origin[3]
pev(index, pev_origin, origin)
set_pev(ent, pev_origin, origin)
set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
dllfunc(DLLFunc_Spawn, ent)
new save = pev(ent, pev_solid)
dllfunc(DLLFunc_Touch, ent, index)
if (pev(ent, pev_solid) != save)
return ent
engfunc(EngFunc_RemoveEntity, ent)
return -1
}
stock fm_get_weapon_id(index, const weapon[])
{
new ent = -1;
while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", weapon)) != 0)
{
if(index == pev(ent, pev_owner))
return ent;
}
return 0;
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
if(id && !is_user_connected(id)) return 0
static buffer[192]
buffer[0] = '^x04'
vformat(buffer[1],190, fmt,3)
message_begin(id ? MSG_ONE : MSG_ALL,gMsg_SayText,{0,0,0},id)
write_byte(id)
write_string(buffer)
message_end()
return 1
} /home/groups/amxmodx/tmp3/phpIxBhn7.sma(104) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(111) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(131) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpIxBhn7.sma(133) : error 088: number of arguments does not match definition
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpIxBhn7.amx (compile failed).
the error i get