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

I'm stumped


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 11-16-2007 , 07:05   I'm stumped
Reply With Quote #1

L 11/13/2007 - 096:18: [SM] Plugin encountered error 22: Maximum number of parameters reached
L 11/13/2007 - 096:18: [SM] Native "Call_PushCell" encountered a generic error.
L 11/13/2007 - 096:18: [SM] Displaying call stack trace for plugin "atac.smx":
L 11/13/2007 - 096:18: [SM] [0] Line 851, C:\hlds1\dod\addons\sourcemod\scripting\atac. sp:unishmentMenuSelected()

I need to head to work but I'll post the code of PunishmentMenuSelected later...
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
BAILOPAN
Join Date: Jan 2004
Old 11-17-2007 , 00:11   Re: I'm stumped
Reply With Quote #2

When is later
__________________
egg
BAILOPAN is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 11-17-2007 , 07:28   Re: I'm stumped
Reply With Quote #3

Sorry, didn't have the time yesterday, bunch of crap kept popping up, here it is.

http://flyingmongoose.ampaste.net/119762

A "registered punishment" (as per the first section of code posted) would be calling that section, and based on the code I have in that area (within the loop) it should NEVER call multiple times...unless my if statement is wrong...which maybe it is and I'm not seeing it. Which, if this is the case would also explain a lot of non-crash output errors I'm having.

killed[attacker][param1] is of course a boolean that indicates that 1 individual killed the other, param1 being the victim whom was killed by [attacker] this is a global variable that gets set underneath player_death and remains like this until either the player is punished or forgiven, or leaves the server.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers

Last edited by FlyingMongoose; 11-17-2007 at 07:30.
FlyingMongoose is offline
BAILOPAN
Join Date: Jan 2004
Old 11-17-2007 , 10:56   Re: I'm stumped
Reply With Quote #4

You can only have at most 32 parameters pushed to a function (that's a hardcoded internal limit which I'd rather not raise right now). If you think about it, your forward is kind of nonsensical anyway, since how are people going to access variable arguments? I don't believe we added a way to do that.

My suggestion is to store the indexes in an array and pass the array instead. It's much simpler.
__________________
egg
BAILOPAN is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 11-17-2007 , 13:46   Re: I'm stumped
Reply With Quote #5

...I shouldn't have more than 3 paramaters anyway....but teame06 pointed out my issue and it should be fixed.

Also, if you look here you'll see how the punishments are handled via "Third party plugins"

http://flyingmongoose.ampaste.net/119826

I tried to make it simple for the developer...as simple as I felt possible...
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers

Last edited by FlyingMongoose; 11-17-2007 at 14:09.
FlyingMongoose 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 20:13.


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