AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run time error 4: index out of bounds (https://forums.alliedmods.net/showthread.php?t=253620)

Snitch 12-25-2014 08:54

Run time error 4: index out of bounds
 
[AMXX] Run time error 4: index out of bounds
Code:

stock bool:IsUserValid( index )
{
return is_user_connected( index ) && !is_user_bot( index ) && !is_user_hltv( index ) ? true : false;
}

[AMXX] HamPlayerMaxSpeedReset_Post
Code:

public HamPlayerMaxSpeedReset_Post( client )
{
if ( !IsUserValid( client ) || !is_user_alive( client ) || !g_iPlayersData[ client ][ Player_Level ] )
return 1;

new iLevel = g_iPlayersData[ client ][ Player_Level ];

set_user_maxspeed( client, get_user_maxspeed( client ) * g_iLevelsData[ iLevel ][ Level_Speed ] );

return 1;
}

EDIT: nvm, i will check it my self

YamiKaitou 12-25-2014 15:43

Re: Run time error 4: index out of bounds
 
Not enough information to assist

Snitch 12-26-2014 02:15

Re: Run time error 4: index out of bounds
 
trash

RateX 12-26-2014 11:49

Re: Run time error 4: index out of bounds
 
Where's g_iPlayersData and g_iLevelsData definition?

Snitch 12-26-2014 17:45

Re: Run time error 4: index out of bounds
 
i have edit my post ^^

YamiKaitou 12-26-2014 18:19

Re: Run time error 4: index out of bounds
 
And you are still not providing everything. Either attach the entire plugin and provide the complete error or we can't help you.


All times are GMT -4. The time now is 15:24.

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