Stack implementation
Hi!
Is there any stack implementation available in amxmodx? I only found this: https://www.amxmodx.org/api/cellstack/__raw But this seems to be not available in latest amxmodx. Any thoughts? Best regards, Marcin |
Re: Stack implementation
|
Re: Stack implementation
Okay, I just found that it's in dev version :oops:
However, I have an issue with it. I need an array that holds stack handles for each of player Code:
new Stack:g_LastHP[33]Code:
PushStackCell(g_LastHP[id], pev(target, pev_health))Code:
g_testStack = CreateStack() |
Re: Stack implementation
Did you try to debug at least? Like printing each cell of g_LastHP ?
Error states you pass an invalid handle, meaning g_LastHP[i] returns 0. Are you sure that "i" is not 0, because at 0 you don't create handle. |
Re: Stack implementation
Quote:
Turns out that g_MaxPL was 0 from the start. Everything is fine now. Sorry for bothering you and thanks for the help! |
Re: Stack implementation
Quote:
|
Re: Stack implementation
Stack is just another dynamic array like.
Difference is how you store and retrieve elements, that's it in a stack way. http://www.wikiwand.com/en/Stack_(abstract_data_type) You can check also the test plugin in scripting/testsuite/. |
| All times are GMT -4. The time now is 15:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.