Raised This Month: $ Target: $400
 0% 

[Help] Resetscore


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZeroCss
Junior Member
Join Date: Jan 2012
Old 01-19-2012 , 17:59   [Help] Resetscore
Reply With Quote #1

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

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
ZeroCss is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-19-2012 , 18:40   Re: [Help] Resetscore
Reply With Quote #2

it cannot read from file which most likely means it's missing ;)
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
ZeroCss
Junior Member
Join Date: Jan 2012
Old 01-20-2012 , 01:57   Re: [Help] Resetscore
Reply With Quote #3

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 ?

Last edited by ZeroCss; 01-20-2012 at 02:17.
ZeroCss is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-20-2012 , 02:24   Re: [Help] Resetscore
Reply With Quote #4

yes.......
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
ZeroCss
Junior Member
Join Date: Jan 2012
Old 01-20-2012 , 02:43   Re: [Help] Resetscore
Reply With Quote #5

Thx it work's now
ZeroCss is offline
tobi187
Junior Member
Join Date: Jan 2012
Old 01-20-2012 , 17:32   Re: [Help] Resetscore
Reply With Quote #6

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

Time for closed? think his problem is solved ;)
tobi187 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode