Raised This Month: $ Target: $400
 0% 

amx_tagct amx_tagt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VisioNN
Junior Member
Join Date: Jan 2013
Old 01-05-2013 , 15:55   amx_tagct amx_tagt
Reply With Quote #1

Hello! I want to add a Tag CT,Tag T to a message who show score. And i have problem with read arguments.

And I want Default tags to be tagct = CT & tagt = T
The Score is working, this is just a part from plugin!
Eq. If i use amx_tagct "GG" after that if I use .score he must show me (Score is: GG: x T: y )


PHP Code:
public plugin_init() 
{
    
register_concmd("amx_tagct""tagct"ACCESS"<Tag> - CT Tag");
    
register_concmd("amx_tagt""tagt"ACCESS"<Tag> - T Tag");
    
register_clcmd("say .score","say_score")
}

public 
say_score(id
{
    
client_print(idprint_chat"Score is: %s: %d %s: %d"tagctctcounttagttcount)
}
public 
tagctidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
        return 
PLUGIN_HANDLED;       
    new 
tagct[32]; 
    
read_argv(1tagct); 
    
remove_quotes(tagct); 
    
console_print(id"Tag from CT team is  %s"tagct





public 
tagtidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
        return 
PLUGIN_HANDLED;       
    new 
tagt[32]; 
    
read_argv(1tagtt); 
    
remove_quotes(tagt); 
    
console_print(id"Tag from T team is %s"tagt



Last edited by VisioNN; 01-05-2013 at 16:06.
VisioNN is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-05-2013 , 15:59   Re: amx_tagct amx_tagt
Reply With Quote #2

We can't help you without more of the plugin. Where are tagct and tagt being defined?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
VisioNN
Junior Member
Join Date: Jan 2013
Old 01-05-2013 , 16:05   Re: amx_tagct amx_tagt
Reply With Quote #3

PHP Code:
public tagctidlevelcid )
{

    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;      
    new 
tagct[32];
    
read_argv(1tagct);
    
remove_quotes(tagct);
    
console_print(id"Tag from CT team is  %s"tagct)


}


public 
tagtidlevelcid )
{

    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;      
    new 
tagt[32];
    
read_argv(1tagtt);
    
remove_quotes(tagt);
    
console_print(id"Tag from T team is %s"tagt)


VisioNN is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-05-2013 , 16:06   Re: amx_tagct amx_tagt
Reply With Quote #4

They need to be a global variable, not a local variable
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
VisioNN
Junior Member
Join Date: Jan 2013
Old 01-05-2013 , 16:23   Re: amx_tagct amx_tagt
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY;
#define tagct = "CT";
#define tagt = "T";

public plugin_init() 
{
    
register_plugin("tag""1.0""tag");
    
register_concmd("amx_tagct""tagct"ACCESS"<Tagct> - CT Tag");
    
register_concmd("amx_tagt""tagt"ACCESS"<Tagt> - T Tag");
    
register_clcmd("say .score","say_score");
}

public 
say_score(id
{
    
client_print(idprint_chat"Score is: %s: 11 %s: 10"tagcttagt)
}
public 
tagctidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
       return 
PLUGIN_HANDLED;       
 
    
read_argv(1tagct); 
    
remove_quotes(tagct); 
    
console_print(id"Tag from CT team is  %s"tagct





public 
tagtidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
            return 
PLUGIN_HANDLED;        
    
read_argv(1tagtt); 
    
remove_quotes(tagt); 
    
console_print(id"Tag from T team is %s"tagt

/tmp/textKbjVMX.sma(11) : error 001: expected token: ",", but found ";"
/tmp/textKbjVMX.sma(11) : error 029: invalid expression, assumed zero
/tmp/textKbjVMX.sma(11) : warning 215: expression has no effect
/tmp/textKbjVMX.sma(11) : error 001: expected token: ";", but found ")"
/tmp/textKbjVMX.sma(11) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

Last edited by VisioNN; 01-05-2013 at 16:24.
VisioNN is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-05-2013 , 16:25   Re: amx_tagct amx_tagt
Reply With Quote #6

PHP Code:
#define ACCESS ADMIN_SLAY
#define tagct  "CT"
#define tagt  "T" 

no need to use ; and =

but in your case you dont need to use DEFINE this is just replacement not a variable

PHP Code:
new tagct[] = "CT";
new 
tagt[] = "T"


but note that the size changed.
you can do this instead:

new tagct[32];
new tagt[32];
before plugin_init.
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-05-2013 at 16:28.
AngeIII is offline
Send a message via Skype™ to AngeIII
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-05-2013 , 16:27   Re: amx_tagct amx_tagt
Reply With Quote #7

#define will not work
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
VisioNN
Junior Member
Join Date: Jan 2013
Old 01-05-2013 , 16:38   Re: amx_tagct amx_tagt
Reply With Quote #8

Thank`s now works that, but i have problem with read_argv

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY
new tagct[] = "CT";
new 
tagt[] = "T"

public 
plugin_init() 
{
    
register_plugin("tag""1.0""tag");
    
register_concmd("amx_tagct""tagct"ACCESS"<Tagct> - CT Tag");
    
register_concmd("amx_tagt""tagt"ACCESS"<Tagt> - T Tag");
    
register_clcmd("say .score","say_score");
}

public 
say_score(id
{
    
client_print(idprint_chat"Score is: %s: 11 %s: 10"tagcttagt)
}
public 
tagctidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
       return 
PLUGIN_HANDLED;       
 
    
read_argv(1tagct); 
    
remove_quotes(tagct); 
    
console_print(id"Tag from CT team is  %s"tagct





public 
tagtidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
            return 
PLUGIN_HANDLED;        
    
read_argv(1tagt); 
    
remove_quotes(tagt); 
    
console_print(id"Tag from T team is %s"tagt


/tmp/textiNPmU5.sma(20) : error 021: symbol already defined: "tagct"
/tmp/textiNPmU5.sma(23) : error 010: invalid function or declaration
/tmp/textiNPmU5.sma(24) : error 010: invalid function or declaration
/tmp/textiNPmU5.sma(26) : error 021: symbol already defined: "read_argv"
/tmp/textiNPmU5.sma(31) : error 054: unmatched closing brace
/tmp/textiNPmU5.sma(34) : error 021: symbol already defined: "tagt"
/tmp/textiNPmU5.sma(37) : error 010: invalid function or declaration
/tmp/textiNPmU5.sma(3 : error 010: invalid function or declaration

8 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textiNPmU5.amx (compile failed).
VisioNN is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-05-2013 , 16:43   Re: amx_tagct amx_tagt
Reply With Quote #9

You cannot have a function and a variable as the same name
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
VisioNN
Junior Member
Join Date: Jan 2013
Old 01-05-2013 , 16:48   Re: amx_tagct amx_tagt
Reply With Quote #10

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY
new tagct[] = "CT";
new 
tagt[] = "T"

public 
plugin_init() 
{
    
register_plugin("tag""1.0""tag");
    
register_concmd("amx_tagctt""tagct"ACCESS"<Tagct> - CT Tag");
    
register_concmd("amx_tagtt""tagt"ACCESS"<Tagt> - T Tag");
    
register_clcmd("say .score","say_score");
}

public 
say_score(id
{
    
client_print(idprint_chat"Score is: %s: 11 %s: 10"tagcttagt)
}
public 
tagcttidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
       return 
PLUGIN_HANDLED;       
 
    
read_argv(1tagct); 
    
remove_quotes(tagct);
    
console_print(id"Tag from CT team is  %s"tagct

    return 
PLUGIN_HANDLED;



public 
tagttidlevelcid 


    if( !
cmd_accessidlevelcid) ) 
            return 
PLUGIN_HANDLED;        
    
read_argv(1tagt); 
    
remove_quotes(tagt); 
    
console_print(id"Tag from T team is %s"tagt
        
    return 
PLUGIN_HANDLED;

/tmp/textXZxDrc.sma(26) : error 088: number of arguments does not match definition
/tmp/textXZxDrc.sma(39) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textXZxDrc.amx (compile failed).

Last edited by VisioNN; 01-05-2013 at 16:55.
VisioNN 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 13:22.


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