Raised This Month: $ Target: $400
 0% 

[PROBLEM SOLVED] [fcos] Run time error 4:index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 04-12-2006 , 08:06  
Reply With Quote #5

#1. None of the tips you posted were even on the "Good programming habits page"
#2. I've already read it and clearly applied the advice to my code
#3. Using global variables is not a bad thing and since it is used in quite a many number of places it takes up less code to make it global and it also helps to keep the coding consistent.
#4. It is easier to read code when the same variable name can be used as much as possible when it represents the same thing.
#5. If I had different variables for every single function I would go insane trying to keep track of them all and writing new for each function or reintroducing them as variables in each function would completely waste coding and add a huge amount to an already big plugin.
#6. Using if ( ! statement ) instead of if ( statement ) is all mere preference and nothing more. If a person has trouble reading statements with ! before them then I would imagine they can't understand half of the code written in amxmodx since that is used in nearly every plugin that I know of. It's not hard to read... if ( ! statement ) means if not statement... so if ( ! is_user_connected ( id ) ) means if the user is not connected. That doesn't seem very difficult at all to me whatsoever.
#7. Telling me I really need to fix a problem I already know needs fixing does not offer any help and if anything waste space on this forum and my time reading it. I am pretty sure the topic name "Run time error 4 index out of bounds" explains in and of itself that I know what the problem is. Obviously index out of bounds relates to the array index going out of bounds and not being looped right... obviously that is the problem.
#8. You rewrote it so it compiles right??? It already compiles with no errors. I am not sure what compiler you are using but you obviously do not know what you are doing. Here is the compile from the .sma listed above:
Code:
Welcome to the AMX Mod X 1.70-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Header size:           2876 bytes
Code size:            55848 bytes
Data size:            13412 bytes
Stack/heap size:      16384 bytes; estimated max. usage=179 cells (716 bytes)
Total requirements:   88520 bytes
Done.
Clearly there are no errors or warnings whatsoever in that message.

Read the first post. I do not want newbies to respond, nor do I want irrelivant information.
SubStream is offline
 



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 16:40.


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