AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Haveing troubble using user_kill (https://forums.alliedmods.net/showthread.php?t=63620)

RaYden 11-25-2007 16:44

Haveing troubble using user_kill
 
1 Attachment(s)
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

purple_pixie 11-26-2007 07:00

Re: Haveing troubble using user_kill
 
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.

RaYden 11-26-2007 07:20

Re: Haveing troubble using user_kill
 
doh ... ic, that didn't cross my mind :D I thought the hook method works a little different
Ty purple_pixie +rep 4 u

purple_pixie 11-26-2007 07:28

Re: Haveing troubble using user_kill
 
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.

RaYden 11-26-2007 07:35

Re: Haveing troubble using user_kill
 
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


All times are GMT -4. The time now is 01:18.

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