Raised This Month: $ Target: $400
 0% 

Weird problem.


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

How would I know? I don't know what plugins you're running.



Here's another problem:

Code:
L 11/19/2017 - 22:22:51: Invalid player id 66
L 11/19/2017 - 22:22:51: [AMXX] Displaying debug trace (plugin "test1.amxx")
L 11/19/2017 - 22:22:51: [AMXX] Run time error 10: native error (native "get_use
r_flags")
L 11/19/2017 - 22:22:51: [AMXX]    [0] test1.sma::SayRegistered (line 111)
(Counter-Terrorist) Black Rose : hello
Code:
        new    pnum,             players[32];                   get_players( players,pnum );                   for( new i;i < pnum;i++ )         {             if( get_user_team( id ) == get_user_team( player[i] ) || get_user_flags( player[i] ) & ADMIN_FLAGS )                 ColorChat( players[i] , iColor, sFormat );         }
player[] is a string containing the player name, players[] is the array of players.
have you even looked at the log? It's so much easier to debug things with the server console at least partially visible on screen so you see when bugs occur. That will help you to figure out the cause.

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

Example ( Plugin is working normaly for everyone and all of a sudden one random admin doesnt have it working, instead they have a default say message: *DEAD* nick : message

And i dont know how to recreate it, or i would probably find a way to fix it, that is why this is so weird.

Last edited by maqi; 11-19-2017 at 16:24.
maqi is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 11-19-2017 , 16:41   Re: Weird problem.
Reply With Quote #3

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 #4

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 #5

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 #6

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 #7

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 #8

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


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