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

Datapack out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 09-14-2019 , 13:06   Datapack out of bounds
Reply With Quote #1

Can anyone shed some light on this error? I think I've provided all the code needed.

Code:
L 09/14/2019 - 10:58:26: [SM] Blaming: dstrikeperks1.smx
L 09/14/2019 - 10:58:26: [SM] Call stack trace:
L 09/14/2019 - 10:58:26: [SM]   [0] DataPack.ReadFloat
L 09/14/2019 - 10:58:26: [SM]   [1] Line 157, D:\Dev\Programming\Pawn\sourcemod\scripting\dstrikeperks1.sp::Timer_ArtyDetonate
L 09/14/2019 - 10:58:26: [SM] Exception reported: DataPack operation is out of bounds.
PHP Code:
    DataPack dp_ShotPack = new DataPack();
    
    for (
int iNUM_EXPLOSIONSi++)
    {
        
CreateDataTimer(f_ShotTime+5.0Timer_ArtyDetonatedp_ShotPack);

        
dp_ShotPack.WriteFloat(f_vCoords[0]);
        
dp_ShotPack.WriteFloat(f_vCoords[1]);
        
dp_ShotPack.WriteFloat(f_vCoords[2]);
    }

public 
Action Timer_ArtyDetonate(Handle timerDataPack dp_ShotPack)
{
    
float f_vCoords[3];
    
dp_ShotPack.Reset();
    
DispatchSpawn(iAmbientLight);
    
TeleportEntity(iAmbientLightf_vCoordsNULL_VECTORNULL_VECTOR);
    
CreateTimer(0.3Timer_TurnOffLightEntIndexToEntRef(iAmbientLight));
    
f_vCoords[0] = dp_ShotPack.ReadFloat() + GetRandomFloat(-100.0100.0); //Line 157
    
f_vCoords[1] = dp_ShotPack.ReadFloat() + GetRandomFloat(-100.0100.0);
    
f_vCoords[2] = dp_ShotPack.ReadFloat(); 
Halt 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 00:29.


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