Raised This Month: $ Target: $400
 0% 

Haveing troubble using user_kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RaYden
Member
Join Date: Sep 2007
Old 11-25-2007 , 16:44   Haveing troubble using user_kill
Reply With Quote #1

When the function user_kill executes my server crashes with the following error:

** New message started when msg '83' has not been sent yet **

This is my script ... it is not finished yet and some functions are not perfected ...

If I remove the code lines that have "user_kill(player)" the script will work just fine, I have searched the forum but found little help on this subject
I have another script that is very similar to this and that works just fine however this doesn't


I would like to ty in advance for your wasted time helping me
Attached Files
File Type: sma Get Plugin or Get Source (slayem.sma - 604 views - 6.2 KB)
RaYden is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-26-2007 , 07:00   Re: Haveing troubble using user_kill
Reply With Quote #2

user_kill() needs to send a "user died" message.

Yet you try to send it during a register_message() hook.

So you are in the middle of a message already.

Either set a task, or catch the event somehow else.
purple_pixie is offline
RaYden
Member
Join Date: Sep 2007
Old 11-26-2007 , 07:20   Re: Haveing troubble using user_kill
Reply With Quote #3

doh ... ic, that didn't cross my mind I thought the hook method works a little different
Ty purple_pixie +rep 4 u
RaYden is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-26-2007 , 07:28   Re: Haveing troubble using user_kill
Reply With Quote #4

Thanks.

Sadly the hook catches just before the message_end(), so you can't send any more.

Try register_event() - I don't know if it will work, but you never know until you try.
purple_pixie is offline
RaYden
Member
Join Date: Sep 2007
Old 11-26-2007 , 07:35   Re: Haveing troubble using user_kill
Reply With Quote #5

I've set a task for the finishing event with 0.2 delay and it works
I'll try after I finish the main parts of the script to revise the hooking part
Ty again for ur support
RaYden 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 01:18.


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