AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Overflowing Bug (https://forums.alliedmods.net/showthread.php?t=45382)

Minimum 09-30-2006 22:59

Overflowing Bug
 
My whole server gets overflowing bugs while trying to run this code. I am running a The Specialists server with Bots (as zombies) and AMXX 1.76a. Any help on getting the overflowing to stop would be greatly appreciated.

Code:
public orgstest(id) {     new playermodel[32], authid[32], sc_output[64], sc_outputtwo[64]     get_user_info(id,"model",playermodel,31)     get_user_authid(id,authid,31)     if(equali(playermodel,"human2")) return PLUGIN_HANDLED     if(equali(authid,"BOT") || equali(authid,"UNKNOWN")) return PLUGIN_HANDLED     select_string("players","org","steamid",authid,sc_output[id],63)     select_string("orgs","modelname","id",sc_output[id],sc_outputtwo[id],63)     if(equali(playermodel,sc_outputtwo[id])) {         return PLUGIN_HANDLED     }     //client_print(id,print_chat,"Access denied to model %s.",playermodel)     set_user_info(id,"model","human2")     return PLUGIN_HANDLED }

stupok 09-30-2006 23:10

Re: Overflowing Bug
 
Please post the code in small format, (put [ small ] and [ /small ])

I think you are trying to prevent clients from joining the zombie team, correct me if I'm wrong. If that's the case, here's the plugin I wrote for that: http://forums.alliedmods.net/showthread.php?t=45123

By the way, I'm the admin of "fluffy's Zombie Server [Fast DL]" and I use the plugin above to prevent players from joining the zombie team. My clients sometimes get overflows or buffer overflows, etc. but that is to be expected when you have a few plugins running and also 25 bots in the server. My advice to prevent overflows is to get rid of plugins that send messages to clients.

Minimum 09-30-2006 23:26

Re: Overflowing Bug
 
I'm trying to prevent anyone from joining a special organization team and the zombie team if they don't have access. The overflowing is pissing people off badly. As you can see I commented out the only thing that sends messages to people. So that wasn't the problem. It does send messages saying that the player changed the team which I can not control because they are in TS itself.

stupok 09-30-2006 23:39

Re: Overflowing Bug
 
You can still use the plugin I wrote for the purpose you just described. Just edit it a little.

If I understand correctly, you want the player to be on the spectator team if he does not have access? Using my plugin you would have to give them some kind of access to amxx like ADMIN_LEVEL_G or whatever.

And about plugins sending messages to clients, that doesn't only mean chat messages. Messages are any kind of information sent to the client, in my limited understanding (a more experienced scripter could explain more thoroughly).

TheNewt 09-30-2006 23:56

Re: Overflowing Bug
 
Quote:

Please post the code in small format, (put [ small ] and [ /small ])
Why does that matter anyways?


And it wouldn't hurt to add a check to make sure that the ID is a valid connected player's ID

stupok 10-01-2006 00:04

Re: Overflowing Bug
 
Quote:

Originally Posted by MysticDeath (Post 386177)
Why does that matter anyways?

Just makes it a bit more clear.

Minimum 10-01-2006 00:12

Re: Overflowing Bug
 
Quote:

Originally Posted by MysticDeath (Post 386177)
Why does that matter anyways?


And it wouldn't hurt to add a check to make sure that the ID is a valid connected player's ID

The function gets called when the client spawns and it only uses that client's ID.

Quote:

Originally Posted by stupok69
And about plugins sending messages to clients, that doesn't only mean chat messages. Messages are any kind of information sent to the client, in my limited understanding (a more experienced scripter could explain more thoroughly).

All it does is set the person's model info. In my knowledge and common sense there is no simpler way around that.

stupok 10-01-2006 00:18

Re: Overflowing Bug
 
You are missing the point. Your plugin can't get any simpler, yes, in terms of sending messages to the client.

The point is to look at your OTHER PLUGINS and MODS to see if they are sending any information to your clients, and trying to minimize the number of those messages if possible.

Even with NO PLUGINS, just The Specialists, it is possible for the client to get an overflow because there are so many bots in the server.

XxAvalanchexX 10-01-2006 00:27

Re: Overflowing Bug
 
Instead of set_user_info, try:

Code:
engclient_cmd(id,"model","human2");

Also, are you 100% sure that it's coming from this plugin? Does the overflow only occur when it actually changes the model, and does it only occur to the person whose model was changed?

Minimum 10-01-2006 00:47

Re: Overflowing Bug
 
Quote:

Originally Posted by XxAvalanchexX (Post 386190)
Instead of set_user_info, try:

Code:
engclient_cmd(id,"model","human2");

Also, are you 100% sure that it's coming from this plugin? Does the overflow only occur when it actually changes the model, and does it only occur to the person whose model was changed?

Yes, it started once I put this in. I haven't touched any other variables or code what so ever.


All times are GMT -4. The time now is 04:52.

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