Quote:
Originally Posted by fysiks
It's called debugging. This is a critical skill that EVERY programmer should have. Getting the values of variables when the error occurs is probably the most common debugging first step. In AMX Mod X plugins, this is usually achieved by adding a server_print(), log_to_file(), or log_amx() containing the information that is relevant.
I didn't think I had to explain this much because I assumed you had reasonable experience considering how complex your code logic is.
You are correct. Moving them in the shop data didn't actually fix the issue. Think about this:
Your function (that had the error) is given an index that relates to the shop data. However, your function doesn't need a shop data index, it needs a knife index. There is a relationship between the two and what you need to do is find out how to translate between them so that you can get the proper index for your purchased knives array.
|
Then it is in the confirmation menu, because when using the plugin actually, the confirmation menu shows up, but when you choose "Purchase" option from the menu, it does not buy the knife, yet it throw an error in the logs, the out of bounds error. You are right, the fix is in the
Handle_ConfirmationMenu function, but I honestly do not know have any idea how to fix it.
I study medical science in the university, I learned PAWN from reading plugins, and trying, and this plugin was actual one complex plugin after many failure plugins or rip offs, but I think it would work out well if someone can guide me correctly in fixing the issues exists in it
__________________