Raised This Month: $ Target: $400
 0% 

Pluging crashes server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-21-2005 , 02:55   Pluging crashes server
Reply With Quote #1

Code:
#include <amxmodx> //Should only need amxmodx and tsx #include <amxmisc> #include <fun> #include <tsx> public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_superjump","0")     register_cvar("amx_kungfu","0")     register_event("ResetHUD","cmd_spawn","be") } public cmd_spawn(id) {     if(get_cvar_num("amx_superjump") == 1 && get_cvar_num("amx_kungfu") == 1) {         new ups = ts_createpwup(TSPWUP_SUPERJUMP)         ts_givepwup(id,ups)         ups = ts_createpwup(TSPWUP_KUNGFU)         ts_givepwup(id,ups)         client_print(id,print_chat,"[AMXX]Received free powerups")     } else if(get_cvar_num("amx_superjump") == 1) {         new ups = ts_createpwup(TSPWUP_SUPERJUMP)         ts_givepwup(id,ups)         client_print(id,print_chat,"[AMXX]Received free powerup")     } else {         new ups = ts_createpwup(TSPWUP_KUNGFU)         ts_givepwup(id,ups)         client_print(id,print_chat,"[AMXX]Received free powerup")     } }

please help! I'm probably using the wrong event and if so thats the problem, I need to know when they spawn!

[edit] I should probably add that it crashes WHILE i join, the bar gets about 3/4 of the way and stops, then the ded server crashes. AMXX 1.01, TSX 1.01, TS 2.1, WIN XP HOME DED SERVER [/edit]
burcyril10 is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-21-2005 , 09:14  
Reply With Quote #2

what if you compile don't you get an error
or if you put ; debug after it in plugins.ini
__________________
- Bye bye!
nightscreem is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-21-2005 , 14:00  
Reply With Quote #3

a) PLUGIN, AUTHOR, and VERSION are never defined.
b) You have to wait a tad bit after creating the powerup before you can give it I believe
c) Are you sure it's this plugin?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-21-2005 , 16:09  
Reply With Quote #4

WHYA RE YOU DOING IT IN HUDRESET!
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-22-2005 , 02:36  
Reply With Quote #5

1. PLUGIN, VERSION, AUTHOR ARE defined, i just didn't put it in.
2. It compiles FINE, its just that whenever its in my plugins.ini (and uncommented) the server crashes when a player joins, therefore its the plugin.
3. I am doing it with hudreset because i don't know of another way

Thats the answers to your questions, now mine ;)
1. Is there a wait function? of should i use set_task? how long should I wait?
2. Is there a better way then with hudreset?
burcyril10 is offline
[cTs] Strake*ROC*
Member
Join Date: Mar 2004
Old 03-23-2005 , 17:40  
Reply With Quote #6

Quote:
Originally Posted by burcyril10
1. PLUGIN, VERSION, AUTHOR ARE defined, i just didn't put it in.
How can we help you if we dont have the FULL code... Sorry bro, but it helps to have all of the code

As in... Ctrl+A, Copy, Paste...
__________________
[cTs] Strake*ROC* is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-23-2005 , 18:48  
Reply With Quote #7

Lol yes I have a problem. I wrote Half-Life 36, but it crashes on the end boss. Here's part of the code:

Code:
return;
What's wrong??
Johnny got his gun is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 03-23-2005 , 19:16  
Reply With Quote #8

oh man,... thats tough jonny...

i dunno if anyone here can fix that one...
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-24-2005 , 19:42  
Reply With Quote #9

Quote:
Originally Posted by XxAvalanchexX
a) PLUGIN, AUTHOR, and VERSION are never defined.
b) You have to wait a tad bit after creating the powerup before you can give it I believe
c) Are you sure it's this plugin?
Sorry but you DIDN'T need the definations because 1. It has ABSOLUTETLY nothing to do with it cause i copied that from my other plugins which work and 2. Because Avalanche worked out the problem, so neeer :p
burcyril10 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 14:04.


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