Raised This Month: $12 Target: $400
 3% 

Taunt Killing Plugin - Errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ibanezez
SourceMod Donor
Join Date: Aug 2014
Location: Earth
Old 09-28-2014 , 02:12   Taunt Killing Plugin - Errors
Reply With Quote #1

GAME == TEAM FORTRESS 2

What i'm trying to get the plugin to do:

When I type !masscrab, it enables mass crab mode. In mass crab mode, anyone who does the spycrab taunt, gets killed.
When I type !disable, it disables mass crab mode, allowing anyone to do the spycrab taunt without getting killed.

My errors:
(23) : error 029: invalid expression, assumed zero
(23) : error 017: undefined symbol "TF2_OnConditionAdded"
(28) : error 001: expected token: ",", but found "-identifier-"
(28) : error 017: undefined symbol "condition"
(28) : error 001: expected token:";", but found ")"
(28) : fatal error 127: too many error message on one line

I am aware that I am doing many things wrong with this, plugin, due to how new I am at sourcepawn. I appreciate any help you guys can provide, and have a great rest of your day.
:)

My code:
Removed due to private plugin
__________________
Hello

Last edited by Ibanezez; 09-28-2014 at 16:06.
Ibanezez is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-28-2014 , 02:35   Re: Taunt Killing Plugin - Errors
Reply With Quote #2

You can't declare a function within another function like that...

Everything that's under TF2_OnConditionAdded but before Command_Disable... when should that happen? Should it happen when the command is used, or should it happen during TF2_OnConditionAdded (which is fired everytime a condition is added to a client)?
__________________

Last edited by ddhoward; 09-28-2014 at 02:35.
ddhoward is offline
Ibanezez
SourceMod Donor
Join Date: Aug 2014
Location: Earth
Old 09-28-2014 , 02:40   Re: Taunt Killing Plugin - Errors
Reply With Quote #3

I just want to turn on a mode, when I type !masscrab, that when the command is on, it kills anyone who does the spycrab taunt. After I type !disable, everything is back to normal, and everyone can do the spycrab taunt without dying.
__________________
Hello
Ibanezez is offline
Ibanezez
SourceMod Donor
Join Date: Aug 2014
Location: Earth
Old 09-28-2014 , 13:54   Re: Taunt Killing Plugin - Errors
Reply With Quote #4

So is there a way I can add functions within functions without creating errors? I want everything inside
PHP Code:
public Action:Command_Masscrab(clientargs
to be active after typing !masscrab. So how would that work, without having multiple functions inside a function?
__________________
Hello
Ibanezez is offline
Ibanezez
SourceMod Donor
Join Date: Aug 2014
Location: Earth
Old 09-28-2014 , 16:06   Re: Taunt Killing Plugin - Errors
Reply With Quote #5

fixed it
__________________
Hello
Ibanezez is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-28-2014 , 20:10   Re: Taunt Killing Plugin - Errors
Reply With Quote #6

The problem stemmed from you not understanding what TF2_OnConditionAdded() is. Command_Masscrab is fired every time someone uses the command, and TF2_OnConditionAdded() is fired every time a player has a condition added to them.
__________________
ddhoward 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 17:07.


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