Hi,
i'm new on scripting(started learning: today
![Razz](images/smilies/tongue.gif)
).
I started a new plugin(and didn't finish yet) and i wanted to see if what i did until now is works good.
I tried to compile it but i got those errors:
Quote:
/groups/sourcemod/upload_tmp/textzwN55A.sp(7) : error 023: array assignment must be simple assignment
/groups/sourcemod/upload_tmp/textzwN55A.sp(17) : error 055: start of function body without function header
/groups/sourcemod/upload_tmp/textzwN55A.sp(20) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textzwN55A.sp(30) : warning 217: loose indentation
/groups/sourcemod/upload_tmp/textzwN55A.sp(31) : warning 217: loose indentation
/groups/sourcemod/upload_tmp/textzwN55A.sp(31) : error 035: argument type mismatch (argument 1)
/groups/sourcemod/upload_tmp/textzwN55A.sp(32) : warning 217: loose indentation
|
What i wrong in my plugin?
PHP Code:
#include <sourcemod>
public Plugin:myinfo =
{
name = "Ben-Command",
author = "Ben-Yaa",
description = "Server commands manager",
version = 1.0,
url = "http://www.RooT.co.il"
};
#define YELLOW "\x01"
#define LIGHTGREEN "\x02"
#define GREEN "\x03"
#define BLUE "\x04"
public OnPluginStart
{
RegAdminCmd( "sm_rr", BCR );
gPluginEnabled = CreateConVar( "sm_bcomm", "1" );
CreateConVar( "bcomm_version", PLUGIN_VERSION, "1.0", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY );
}
public Action:BCR( id, args )
{
new String:name[64];
GetClientName(id,name,sizeof(name));
new String:BCC[192];
Format(BCC,sizeof(BCC),"\x01[\x03Ben-Command\x01] \x03Admin \x04%s \x03has restarted the round!",name);
PrintToChat(BCC);
return Plugin_Handled;
}
And one more question: how can i control rcon? beacuse i wanna it to do mp_restartround 1.
Thx all!