Raised This Month: $32 Target: $400
 8% 

Array Index Out of Bounds at Enum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NC.svtrade
Senior Member
Join Date: Nov 2015
Old 12-14-2017 , 09:29   Array Index Out of Bounds at Enum
Reply With Quote #1

COMPILER CODE
PHP Code:
SETSourcePawn_compiler C:\Programming\SorucePawn\Compile\spcomp.exe
$(SOURCEPAWN_COMPILER) = C:\Programming\SorucePawn\Compile\spcomp.exe
SET
SourcePawn_output C:\Programming\SorucePawn\Compile\compiled
$(SOURCEPAWN_OUTPUT) = C:\Programming\SorucePawn\Compile\compiled
SET
pl C:\tf2server01\tf\addons\sourcemod\plugins
$(PL) = C:\tf2server01\tf\addons\sourcemod\plugins
NPP_SAVE
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp
C
:\Programming\SorucePawn\Compile\spcomp.exe "C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp" -"C:\Programming\SorucePawn\Compile\compiled\viewmodel.smx"
Process started >>>
SourcePawn Compiler 1.8.0.6025
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2015 AlliedModders LLC

C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(186) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(188) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(228) : warning 217loose indentation
C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(239) : warning 217loose indentation
C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(249) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(251) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(254) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(256) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(257) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(272) : warning 203symbol is never used"button"
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(272) : warning 203symbol is never used"client"
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(291) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(371) : warning 217loose indentation
C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(383) : warning 217loose indentation
C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(430) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(436) : warning 234symbol "FindSendPropOffs" is marked as deprecated: Use FindSendPropInfo instead, or HasEntProp if you just want to check for existence.

C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(457) : warning 219local variable "cls" shadows a variable at a preceding level
C
:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(478) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(482) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(484) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(572) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(573) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(574) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(575) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(576) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(577) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(578) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(585) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(591) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(592) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(593) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(594) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(595) : error 032: array index out of bounds (variable "g_iWeaponInfo")
C:\Programming\SorucePawn\Projects\CSGO\Src\modules\viewmodel.sp(596) : error 032: array index out of bounds (variable "g_iWeaponInfo")

Compilation aborted.
26 Errors.
<<< 
Process finished. (Exit code 1)
cmd /c copy "C:\Programming\SorucePawn\Compile\compiled\viewmodel.smx" "C:\tf2server01\tf\addons\sourcemod\plugins\viewmodel.smx"
Process started >>>
        
1&#44060; 파일이 복사되었습니다.
<<< Process finished. (Exit code 0)
================ 
READY ================ 
Help.

Attached Files
File Type: sp Get Plugin or Get Source (viewmodel.sp - 215 views - 43.4 KB)
NC.svtrade is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-14-2017 , 10:27   Re: Array Index Out of Bounds at Enum
Reply With Quote #2

have you try logging/printing out GetCurrentSlot?
is it giving number greater than 4?
__________________
8guawong is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-14-2017 , 20:10   Re: Array Index Out of Bounds at Enum
Reply With Quote #3

In your enum for WeaponInfo, supplying enum member values is not doing at all what you want. Get rid of the manually set values. They do not have anything to do with default values, which is what I assume you intended them to be.
Fyren 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:58.


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