Raised This Month: $ Target: $400
 0% 

MSG_ONE Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Callesson
Member
Join Date: Jan 2010
Old 12-20-2010 , 08:53   MSG_ONE Error
Reply With Quote #1

Hello

So, I got this error message
Msg_one or MSG_one_UNRELIABLE with no target entity.
I've searched on google and found out that it is because a message isn't called for anyone.
So the last thing I changed in my code was this below
PHP Code:
  ColorChat0NORMALad_Data

PHP Code:
  ColorChatidNORMALad_Data
But i don't see why it shouldn't work ?

Here is whole code

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <colorchat>

#define PLUGIN "Ads"
#define VERSION "1.0"
#define AUTHOR "Callesson"

new InfoCheck

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("RoundStart"2"1=Round_Start");
    
RegisterHamHam_Spawn"player""PlayerSpawn");
    
InfoCheck 0
}
public 
RoundStart(id,client)
{
    
remove_task(client)
    
set_task(random_float(20.027.0), "checkPlayers",id);
    
set_task(15.0,"info_wc"client__"a",1);
    
set_task(20.0,"info_cd"client__"a",1);
    
set_task(25.0,"info_hpk"client__"a",1);
}
public 
checkPlayers()
{
    new 
players
    players 
get_maxplayers()
    for(new 
i=0;<= players;i++)
    {
        
displayAd(i)
    }
}
stock displayAd(id)
{
    new 
ad_file[128]
    
get_localinfo("amxx_configsdir",ad_file,127)
    
format(ad_file,127,"%s/ads.txt",ad_file)
    new 
ad_Data[257];
    new 
file fopen(ad_file"rt");
    
    while( !
feof(file) )
    { 
        
fgets(filead_Data256);    
        
replace_all ad_Data256"[green]""^4" 
        
replace_all ad_Data256"[normal]""^1" 
        
replace_all ad_Data256"[team]""^3" 
        
ColorChatidNORMALad_Data)
    }
    
set_task(random_float(20.027.0), "checkPlayers",id);
    return 
PLUGIN_CONTINUE;
}
public 
info_wc()
{
        if(
InfoCheck == 0)
    {
    
ColorChat0NORMAL"This server is using ^4[Ng Weapon Chance]^1 by ^4Callesson")
    
InfoCheck++
    }
}
public 
info_cd()
{
        if(
InfoCheck == 1)
    {
    
ColorChat0NORMAL"This server is using ^4[Ng Connect/Disconnect]^1 by ^4Callesson")    
    
InfoCheck++
    }
}
public 
info_hpk()
{
        if(
InfoCheck == 2)
    {
    
ColorChat0NORMAL"This server is using ^4[Ng High Ping Kicker]^1 by ^4Callesson")
    
InfoCheck++
    }
}
public 
client_disconnect(id
{

__________________
Callesson is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-20-2010 , 18:45   Re: MSG_ONE Error
Reply With Quote #2

You can't use 0. You have to loop through all players.
__________________
fysiks is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-20-2010 , 19:46   Re: MSG_ONE Error
Reply With Quote #3

why don't you use this: http://forums.alliedmods.net/showthread.php?p=236886 ?
it's the best
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-20-2010 , 23:42   Re: MSG_ONE Error
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You can't use 0. You have to loop through all players.
Actually, 0 works for the colorchat.inc file that I have.

@Callesson
This shouldn't affect your code, but the round start event does not give any player id's to the function.
When it is executed, those variables will always be 0 because there are no values to be passed to it.
Attached Files
File Type: inc colorchat.inc (2.4 KB, 143 views)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Callesson
Member
Join Date: Jan 2010
Old 12-21-2010 , 12:10   Re: MSG_ONE Error
Reply With Quote #5

Quote:
Originally Posted by georgik57 View Post
why don't you use this: http://forums.alliedmods.net/showthread.php?p=236886 ?
it's the best
Because I'm learning pawn, and I'm trying to make my own plugins to my server
Quote:
Originally Posted by Exolent[jNr] View Post
Actually, 0 works for the colorchat.inc file that I have.

@Callesson
This shouldn't affect your code, but the round start event does not give any player id's to the function.
When it is executed, those variables will always be 0 because there are no values to be passed to it.
0 works for me too.

Oh yea, thats true. I think I know who to solve it now.
Thank you guys!
__________________

Last edited by Callesson; 12-21-2010 at 12:12.
Callesson 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 18:22.


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