core/smn_player.cpp
changeset 994 a0d587e40030
parent 992 77133031b0d2
child 998 b26df4dd8187
     1.1 --- a/core/smn_player.cpp	Wed Jun 20 11:12:50 2007 +0000
     1.2 +++ b/core/smn_player.cpp	Wed Jun 20 11:30:29 2007 +0000
     1.3 @@ -55,7 +55,7 @@
     1.4  	int index = params[1];
     1.5  	if ((index < 1) || (index > g_Players.GetMaxClients()))
     1.6  	{
     1.7 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
     1.8 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
     1.9  	}
    1.10  
    1.11  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
    1.12 @@ -73,7 +73,7 @@
    1.13  	int index = params[1];
    1.14  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.15  	{
    1.16 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.17 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.18  	}
    1.19  
    1.20  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
    1.21 @@ -99,7 +99,7 @@
    1.22  	int index = params[1];
    1.23  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.24  	{
    1.25 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.26 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.27  	}
    1.28  
    1.29  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
    1.30 @@ -123,7 +123,7 @@
    1.31  	int index = params[1];
    1.32  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.33  	{
    1.34 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.35 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.36  	}
    1.37  
    1.38  	return (g_Players.GetPlayerByIndex(index)->IsConnected()) ? 1 : 0;
    1.39 @@ -134,7 +134,7 @@
    1.40  	int index = params[1];
    1.41  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.42  	{
    1.43 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.44 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.45  	}
    1.46  
    1.47  	return (g_Players.GetPlayerByIndex(index)->IsInGame()) ? 1 : 0;
    1.48 @@ -145,7 +145,7 @@
    1.49  	int index = params[1];
    1.50  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.51  	{
    1.52 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.53 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.54  	}
    1.55  
    1.56  	return (g_Players.GetPlayerByIndex(index)->IsAuthorized()) ? 1 : 0;
    1.57 @@ -156,7 +156,7 @@
    1.58  	int index = params[1];
    1.59  	if ((index < 1) || (index > g_Players.GetMaxClients()))
    1.60  	{
    1.61 -		return pCtx->ThrowNativeError("Invalid client index %d", index);
    1.62 +		return pCtx->ThrowNativeError("Client index %d is invalid", index);
    1.63  	}
    1.64  
    1.65  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
    1.66 @@ -174,7 +174,7 @@
    1.67  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
    1.68  	if (!pPlayer)
    1.69  	{
    1.70 -		return pContext->ThrowNativeError("Invalid client index %d", client);
    1.71 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
    1.72  	}
    1.73  	if (!pPlayer->IsConnected())
    1.74  	{
    1.75 @@ -200,7 +200,7 @@
    1.76  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
    1.77  	if (!pPlayer)
    1.78  	{
    1.79 -		return pContext->ThrowNativeError("Invalid client index %d", client);
    1.80 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
    1.81  	}
    1.82  	if (!pPlayer->IsConnected())
    1.83  	{
    1.84 @@ -208,7 +208,7 @@
    1.85  	}
    1.86  	if (!g_Admins.IsValidAdmin(params[2]))
    1.87  	{
    1.88 -		return pContext->ThrowNativeError("AdminId %x is not valid", params[2]);
    1.89 +		return pContext->ThrowNativeError("AdminId %x is invalid", params[2]);
    1.90  	}
    1.91  
    1.92  	pPlayer->SetAdminId(params[2], params[3] ? true : false);
    1.93 @@ -222,7 +222,7 @@
    1.94  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
    1.95  	if (!pPlayer)
    1.96  	{
    1.97 -		return pContext->ThrowNativeError("Invalid client index %d", client);
    1.98 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
    1.99  	}
   1.100  	if (!pPlayer->IsConnected())
   1.101  	{
   1.102 @@ -238,7 +238,7 @@
   1.103  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.104  	if (!pPlayer)
   1.105  	{
   1.106 -		return pContext->ThrowNativeError("Invalid client index %d", client);
   1.107 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.108  	}
   1.109  	if (!pPlayer->IsConnected())
   1.110  	{
   1.111 @@ -268,7 +268,7 @@
   1.112  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.113  	if (!pPlayer)
   1.114  	{
   1.115 -		return pContext->ThrowNativeError("Invalid client index %d", client);
   1.116 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.117  	}
   1.118  	if (!pPlayer->IsConnected())
   1.119  	{
   1.120 @@ -297,7 +297,7 @@
   1.121  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.122  	if (!pPlayer)
   1.123  	{
   1.124 -		return pContext->ThrowNativeError("Invalid client index %d", client);
   1.125 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.126  	}
   1.127  	if (!pPlayer->IsConnected())
   1.128  	{
   1.129 @@ -322,7 +322,7 @@
   1.130  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.131  	if (!pPlayer)
   1.132  	{
   1.133 -		return pContext->ThrowNativeError("Invalid client index %d", client);
   1.134 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.135  	}
   1.136  	if (!pPlayer->IsConnected())
   1.137  	{
   1.138 @@ -344,7 +344,7 @@
   1.139  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.140  	if (!pPlayer)
   1.141  	{
   1.142 -		return pContext->ThrowNativeError("Invalid client index %d", client);
   1.143 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.144  	}
   1.145  	if (!pPlayer->IsConnected())
   1.146  	{
   1.147 @@ -362,17 +362,17 @@
   1.148  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.149  	if (!pPlayer)
   1.150  	{
   1.151 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.152 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.153  	} else if (!pPlayer->IsConnected()) {
   1.154 -		return pContext->ThrowNativeError("Player %d is not connected", client);
   1.155 +		return pContext->ThrowNativeError("Client %d is not connected", client);
   1.156  	}
   1.157  
   1.158  	CPlayer *pTarget = g_Players.GetPlayerByIndex(target);
   1.159  	if (!pTarget)
   1.160  	{
   1.161 -		return pContext->ThrowNativeError("Player %d is not a valid client", target);
   1.162 +		return pContext->ThrowNativeError("Client index %d is invalid", target);
   1.163  	} else if (!pTarget->IsConnected()) {
   1.164 -		return pContext->ThrowNativeError("Player %d is not connected", target);
   1.165 +		return pContext->ThrowNativeError("Client %d is not connected", target);
   1.166  	}
   1.167  
   1.168  	return g_Admins.CanAdminTarget(pPlayer->GetAdminId(), pTarget->GetAdminId()) ? 1 : 0;
   1.169 @@ -385,9 +385,9 @@
   1.170  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.171  	if (!pPlayer)
   1.172  	{
   1.173 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.174 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.175  	} else if (!pPlayer->IsInGame()) {
   1.176 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.177 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.178  	}
   1.179  
   1.180  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.181 @@ -406,9 +406,9 @@
   1.182  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.183  	if (!pPlayer)
   1.184  	{
   1.185 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.186 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.187  	} else if (!pPlayer->IsInGame()) {
   1.188 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.189 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.190  	}
   1.191  
   1.192  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.193 @@ -427,9 +427,9 @@
   1.194  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.195  	if (!pPlayer)
   1.196  	{
   1.197 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.198 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.199  	} else if (!pPlayer->IsInGame()) {
   1.200 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.201 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.202  	}
   1.203  
   1.204  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.205 @@ -448,9 +448,9 @@
   1.206  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.207  	if (!pPlayer)
   1.208  	{
   1.209 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.210 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.211  	} else if (!pPlayer->IsInGame()) {
   1.212 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.213 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.214  	}
   1.215  
   1.216  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.217 @@ -469,9 +469,9 @@
   1.218  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.219  	if (!pPlayer)
   1.220  	{
   1.221 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.222 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.223  	} else if (!pPlayer->IsInGame()) {
   1.224 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.225 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.226  	}
   1.227  
   1.228  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.229 @@ -498,9 +498,9 @@
   1.230  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.231  	if (!pPlayer)
   1.232  	{
   1.233 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.234 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.235  	} else if (!pPlayer->IsInGame()) {
   1.236 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.237 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.238  	}
   1.239  
   1.240  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.241 @@ -527,9 +527,9 @@
   1.242  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.243  	if (!pPlayer)
   1.244  	{
   1.245 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.246 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.247  	} else if (!pPlayer->IsInGame()) {
   1.248 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.249 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.250  	}
   1.251  
   1.252  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.253 @@ -556,9 +556,9 @@
   1.254  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.255  	if (!pPlayer)
   1.256  	{
   1.257 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.258 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.259  	} else if (!pPlayer->IsInGame()) {
   1.260 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.261 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.262  	}
   1.263  
   1.264  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.265 @@ -585,9 +585,9 @@
   1.266  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.267  	if (!pPlayer)
   1.268  	{
   1.269 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.270 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.271  	} else if (!pPlayer->IsInGame()) {
   1.272 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.273 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.274  	}
   1.275  
   1.276  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.277 @@ -609,9 +609,9 @@
   1.278  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.279  	if (!pPlayer)
   1.280  	{
   1.281 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.282 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.283  	} else if (!pPlayer->IsInGame()) {
   1.284 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.285 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.286  	}
   1.287  
   1.288  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.289 @@ -633,9 +633,9 @@
   1.290  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.291  	if (!pPlayer)
   1.292  	{
   1.293 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.294 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.295  	} else if (!pPlayer->IsInGame()) {
   1.296 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.297 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.298  	}
   1.299  
   1.300  	IPlayerInfo *pInfo = pPlayer->GetPlayerInfo();
   1.301 @@ -654,11 +654,11 @@
   1.302  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.303  	if (!pPlayer)
   1.304  	{
   1.305 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.306 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.307  	} else if (!pPlayer->IsInGame()) {
   1.308 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.309 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.310  	} else if (pPlayer->IsFakeClient()) {
   1.311 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.312 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.313  	}
   1.314  
   1.315  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.316 @@ -673,11 +673,11 @@
   1.317  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.318  	if (!pPlayer)
   1.319  	{
   1.320 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.321 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.322  	} else if (!pPlayer->IsInGame()) {
   1.323 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.324 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.325  	} else if (pPlayer->IsFakeClient()) {
   1.326 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.327 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.328  	}
   1.329  
   1.330  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.331 @@ -692,11 +692,11 @@
   1.332  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.333  	if (!pPlayer)
   1.334  	{
   1.335 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.336 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.337  	} else if (!pPlayer->IsInGame()) {
   1.338 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.339 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.340  	} else if (pPlayer->IsFakeClient()) {
   1.341 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.342 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.343  	}
   1.344  
   1.345  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.346 @@ -711,11 +711,11 @@
   1.347  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.348  	if (!pPlayer)
   1.349  	{
   1.350 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.351 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.352  	} else if (!pPlayer->IsInGame()) {
   1.353 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.354 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.355  	} else if (pPlayer->IsFakeClient()) {
   1.356 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.357 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.358  	}
   1.359  
   1.360  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.361 @@ -730,11 +730,11 @@
   1.362  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.363  	if (!pPlayer)
   1.364  	{
   1.365 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.366 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.367  	} else if (!pPlayer->IsInGame()) {
   1.368 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.369 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.370  	} else if (pPlayer->IsFakeClient()) {
   1.371 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.372 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.373  	}
   1.374  
   1.375  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.376 @@ -749,11 +749,11 @@
   1.377  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.378  	if (!pPlayer)
   1.379  	{
   1.380 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.381 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.382  	} else if (!pPlayer->IsInGame()) {
   1.383 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.384 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.385  	} else if (pPlayer->IsFakeClient()) {
   1.386 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.387 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.388  	}
   1.389  
   1.390  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.391 @@ -768,11 +768,11 @@
   1.392  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.393  	if (!pPlayer)
   1.394  	{
   1.395 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.396 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.397  	} else if (!pPlayer->IsInGame()) {
   1.398 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.399 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.400  	} else if (pPlayer->IsFakeClient()) {
   1.401 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.402 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.403  	}
   1.404  
   1.405  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.406 @@ -787,11 +787,11 @@
   1.407  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.408  	if (!pPlayer)
   1.409  	{
   1.410 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.411 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.412  	} else if (!pPlayer->IsInGame()) {
   1.413 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.414 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.415  	} else if (pPlayer->IsFakeClient()) {
   1.416 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.417 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.418  	}
   1.419  
   1.420  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.421 @@ -806,11 +806,11 @@
   1.422  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.423  	if (!pPlayer)
   1.424  	{
   1.425 -		return pContext->ThrowNativeError("Player %d is not a valid client", client);
   1.426 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.427  	} else if (!pPlayer->IsInGame()) {
   1.428 -		return pContext->ThrowNativeError("Player %d is not in game", client);
   1.429 +		return pContext->ThrowNativeError("Client %d is not in game", client);
   1.430  	} else if (pPlayer->IsFakeClient()) {
   1.431 -		return pContext->ThrowNativeError("Player %d is a bot", client);
   1.432 +		return pContext->ThrowNativeError("Client %d is a bot", client);
   1.433  	}
   1.434  
   1.435  	INetChannelInfo *pInfo = engine->GetPlayerNetInfo(client);
   1.436 @@ -926,7 +926,7 @@
   1.437  	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
   1.438  	if (!pPlayer)
   1.439  	{
   1.440 -		return pContext->ThrowNativeError("Client %d is invalid", client);
   1.441 +		return pContext->ThrowNativeError("Client index %d is invalid", client);
   1.442  	} else if (!pPlayer->IsConnected()) {
   1.443  		return pContext->ThrowNativeError("Client %d is not connected", client);
   1.444  	}