Raised This Month: $ Target: $400
 0% 

host_error: issues


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 04-18-2011 , 16:58   host_error: issues
Reply With Quote #1

Can someone tell me when or how this error occurs?

Host_Error: WriteDest_Parm: not a client

I already set in the top of the function:

PHP Code:
if(!is_user_bot(index) && is_user_connected(index)) 
but no luck, the server still crashes
killergirl is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-18-2011 , 17:01   Re: host_error: issues
Reply With Quote #2

Show more code, but it's generally an invalid index ( 0 or > maxclients ) is passed into message_begin() with MSG_ONE/UNRELIABLE.
__________________
Arkshine is offline
killergirl
Senior Member
Join Date: Jul 2010
Old 04-18-2011 , 17:07   Re: host_error: issues
Reply With Quote #3

PHP Code:
public sendMessage (color[], alive)
{
    new 
teamName[10]
    
    for (new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_bot(player))
        {
            if(
is_user_connected(player))
            {
                
get_user_team (playerteamName9)    // Stores user's team name to change back after sending the message
                            
                
changeTeamInfo (playercolor)        // Changes user's team according to color choosen
                            
                
writeMessage (playermessage)        // Writes the message on player's chat
                            
                
changeTeamInfo (playerteamName)    // Changes user's team back to original
            
}
        }
    }

PHP Code:
public sendTeamMessage (color[], aliveplayerTeam)
{
    new 
teamName[10]
    
    for (new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_bot(player))
        {
            if (
get_user_team(player) == playerTeam)
            {
                if(
is_user_connected(player))
                {
                    
get_user_team (playerteamName9)    // Stores user's team name to change back after sending the message
                                
                    
changeTeamInfo (playercolor)        // Changes user's team according to color choosen
                                
                    
writeMessage (playermessage)        // Writes the message on player's chat
                                
                    
changeTeamInfo (playerteamName)    // Changes user's team back to original
                
}
            }
        }
    }

PHP Code:
public changeTeamInfo (playerteam[])
{
    if(
is_user_connected(player))
    {
        if(!
is_user_bot(player))
        {
            
message_begin (MSG_ONEteamInfo_player)    // Tells to to modify teamInfo (Which is responsable for which time player is)
            
write_byte (player)                // Write byte needed
            
write_string (team)                // Changes player's team
            
message_end()
        }
    }
}


public 
writeMessage (playermessage[])
{
    if(
is_user_connected(player))
    {
        if(!
is_user_bot(player))
        {
            
message_begin (MSG_ONEsayText, {000}, player)    // Tells to modify sayText (Which is responsable for writing colored messages)
            
write_byte (player)                    // Write byte needed
            
write_string (message)                    // Effectively write the message, finally, afterall
            
message_end ()                        // Needed as always
        
}
    }

killergirl is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 04-19-2011 , 16:03   Re: host_error: issues
Reply With Quote #4

i think problem is:
PHP Code:
for (new player 1player maxPlayersplayer++) 
try with:
PHP Code:
for (new player 1player <= maxPlayersplayer++) 
or
PHP Code:
for (new player 0player maxPlayersplayer++) 
JocAnis is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 04-19-2011 , 17:10   Re: host_error: issues
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
PHP Code:
for (new player 1player <= maxPlayersplayer++) 
This one is the only right one.

For this one
PHP Code:
for(new player 0player maxPlayerplayer++) 
You should use get_players()
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
killergirl
Senior Member
Join Date: Jul 2010
Old 04-19-2011 , 17:55   Re: host_error: issues
Reply With Quote #6

Thank you for helping me, I already tried to get all players than loop but the problem was something else. In another function I tried to hook death, check for killer weapon than do something.
killergirl is offline
Reply


Thread Tools
Display Modes

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 20:09.


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