PDA

View Full Version : [Help] Resetscore


ZeroCss
01-19-2012, 17:59
Now i edited the resetscore plugin i added #include <colors> and its an error at compile it

Your plugin failed to compile! Read the errors below:
SourcePawn Compiler 1.4.0 Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC /home/groups/sourcemod/upload_tmp/phphIeLVN.sp(4) : fatal error 120: cannot read from file: "colors" Compilation aborted. 1 Error.


Here is the code

#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <colors>

#define PLUGIN_AUTHOR "tuty"
#define PLUGIN_VERSION "1.1"

new Handle:gPluginEnabled = INVALID_HANDLE;

public Plugin:myinfo =
{
name = "Resetscore",
author = PLUGIN_AUTHOR,
description = "Type !resetscore in chat to reset your score.",
version = PLUGIN_VERSION,
url = "www.ligs.us"
};
public OnPluginStart()
{
RegConsoleCmd( "say", CommandSay );
RegConsoleCmd( "say_team", CommandSay );

gPluginEnabled = CreateConVar( "sm_resetscore", "1" );
CreateConVar( "resetscore_version", PLUGIN_VERSION, "Reset Score", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY );
}
public Action:CommandSay( id, args )
{
decl String:Said[ 128 ];
GetCmdArgString( Said, sizeof( Said ) - 1 );
StripQuotes( Said );
TrimString( Said );

if( StrEqual( Said, "!resetscore" ) || StrEqual( Said, "!rs" ) )
{
if( GetConVarInt( gPluginEnabled ) == 0 )
{
PrintToChat( id, "\x03[SM Resetscore] Plugin je iskljucen." );
PrintToConsole( id, "[SM Resetscore] Nemozes koristi komandu dok je plugin iskljucen!" );

return Plugin_Continue;
}

if( GetClientDeaths( id ) == 0 && GetClientFrags( id ) == 0 )
{
PrintToChat( id, "\x03[SM Resetscore] Tvoj score je vec 0!" );
PrintToConsole( id, "[SM Resetscore] Nemozes restartovati score trenutno." );

return Plugin_Continue;
}

SetClientFrags( id, 0 );
SetClientDeaths( id, 0 );

decl String:Name[ 32 ];
GetClientName( id, Name, sizeof( Name ) - 1 );

PrintToChat( id, "\x03[SM Resetscore] Uspjesno si resetovao score!" );
PrintToChatAll( "\x03[SM Resetscore] s je resetovao score.", Name );
PrintToConsole( id, "[SM Resetscore] Uspjesno si resetovao svoj score." );
}

return Plugin_Continue;
}
stock SetClientFrags( index, frags )
{
SetEntProp( index, Prop_Data, "m_iFrags", frags );
return 1;
}
stock SetClientDeaths( index, deaths )
{
SetEntProp( index, Prop_Data, "m_iDeaths", deaths );
return 1;
}
Help pls :)

berni
01-19-2012, 18:40
it cannot read from file which most likely means it's missing ;)

ZeroCss
01-20-2012, 01:57
I have the file in include in scripting but don't know why doesn't want it to compile

I'm using the online compiler maybe is it that ?

andi67
01-20-2012, 02:24
yes.......

ZeroCss
01-20-2012, 02:43
Thx it work's now :)

tobi187
01-20-2012, 17:32
The simpliest error gets annoying, if you have more than 1 server on a root. just forget to copy the colors.inc or other files whilst scripting is for example a problem, that i think everyone had in the past :D

Time for closed? think his problem is solved ;)