|
Author
|
Message
|
|
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
|

08-18-2014
, 10:19
Array must be indexed
|
#1
|
Hi there. I got the error mentioned above trying to compile my plugin. Here's my code. What am I doing wrong?
Spoiler
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#pragma semicolon 1
new PLUG[] = "Deagle giveaway";
new VERS[] = "1.0";
new AUTH[] = "EpicKiller";
new tag;
new ammo;
new req_tag;
public plugin_init()
{
register_plugin(PLUG, VERS, AUTH);
register_clcmd("say /dgl", "cmdDeagle");
register_clcmd("say_team /dgl", "cmdDeagle");
tag = register_cvar("deagle_required_tag", "# Ecila");
ammo = register_cvar("deagle_ammo", "35");
}
public cmdDeagle(id)
{
new name[32];
get_user_name(id, name, charsmax(name));
req_tag = get_pcvar_num(tag);
if(name & req_tag)
{
new ammo_num = get_pcvar_num(ammo);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, ammo_num);
}
return PLUGIN_HANDLED;
}
__________________
~ Swiftly and with style ~
|
|
|
|