Raised This Month: $51 Target: $400
 12% 

Weird problem.


Post New Thread Reply   
 
Thread Tools Display Modes
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 11-19-2017 , 16:41   Re: Weird problem.
Reply With Quote #11

Code is not random. Bugs don't just occur. They always have a cause.
After I fixed those two errors I found I haven't found anything else and I also haven't been able to create any bug.
Black Rose is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 11-19-2017 , 16:47   Re: Weird problem.
Reply With Quote #12

Woops Thanks for that one. That solves one problem.

Theres still that random occurrence ( which is not random ), but im not able to recreate it at this point either.
maqi is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 11-19-2017 , 17:00   Re: Weird problem.
Reply With Quote #13

If you really want to get to the bottom of it, add a lot of server_print() or amx_log(), printing all the variables.
That way, you can retrace the steps of that bug to the origin.

But if the plugin does nothing and the original message is showing then you most likely have an error in the log because your plugin halted before completing the function.

Last edited by Black Rose; 11-19-2017 at 17:01.
Black Rose is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 11-19-2017 , 17:04   Re: Weird problem.
Reply With Quote #14

Thank you so much for everything, you helped a lot. Thanks for fixing a couple of my oversights i wasnt able to see

One last question while we are at logs, would it be too much to log every message, that would really be usefull ?
maqi is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 11-19-2017 , 17:13   Re: Weird problem.
Reply With Quote #15

Depends on what you mean. I wouldn't log it permanently but if it's for debugging purposes and you intend to delete the logs whenever you're done with the debugging it's completely fine.

Do it for a while and see how much space it will take up. That's all you have to worry about. CPU/RAM is hardly the bottleneck in a chat logging situation. The hard drive is much slower.

Last edited by Black Rose; 11-19-2017 at 17:13.
Black Rose is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 11-19-2017 , 17:18   Re: Weird problem.
Reply With Quote #16

Then better no We have a lot of chat messages going on And i meant permanently not for debugging.

Thanks once again. All the best

Last edited by maqi; 11-19-2017 at 17:18.
maqi is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-19-2017 , 19:50   Re: Weird problem.
Reply With Quote #17

Quote:
Originally Posted by maqi View Post
I dont get if you are saying i shouldnt or that it wont work. Because that part is working perfectly
Take a look at this thread.
__________________
edon1337 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 11-21-2017 , 10:32   Re: Weird problem.
Reply With Quote #18

Quote:
Originally Posted by maqi View Post
I agree with you, but i fixed that mistake.

My question is why is the say message ever happening if my plugin is essentially this:
PHP Code:
public plugin_init() 
    
register_clcmd"say""SayRegistered" );
public 
SayRegistered(id)
    return 
PLUGIN_HANDLED 
Maybe you have a plugin like all chat or something like this that sends a message artificially and then returns handled.
Solution is to put it above all plugins in plugins.ini and see what happens.
siriusmd99 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 10:49.


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