Raised This Month: $ Target: $400
 0% 

client_authorized triggers twice?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BetaX
Member
Join Date: Nov 2005
Old 02-14-2007 , 03:02   Re: client_authorized triggers twice?
Reply With Quote #10

Code:
    if(task_exists(id+6500)) id -= 6500         if(!is_user_connected(id) && !is_user_connecting(id))     {         remove_task(id+6500)         return PLUGIN_HANDLED     }

Something feels wrong there.

I'm thinking that first 'task_exists' is wrong.
If the task does exist, do you want to do:

Code:
        id -= 6500

or do you want:

Code:
       remove_task(id+6500)

Also, should:

Code:
       if(!is_user_connected(id) && !is_user_connecting(id))

have its && changed to a ||?

I recommend writing out your thoughts on a piece of paper to clear out what makes sense and what does not. Draw a flowchart or something.

Edit: And for the sake of the processor, change all those id+6500's to a single variable equalling id + 6500... for whatever reason you are doing that.
BetaX is offline
 



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 00:41.


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