Array Index Out Of Bounds
#1

PHP код:
new Float:FedexPoints[5][4] = {
{
1298.6033,-1856.7441,12.9526,88.7204},
{
1293.3746,-1650.4768,12.9565,181.3578},
{
1195.2435,-1324.1394,12.9615,181.9488},
{
1315.7272,-920.2856,37.5370,72.5887},
{
1009.0753,-932.6588,41.7536,97.1067}
}; 
PHP код:
            new rand random(sizeof(FedexPoints));
            
SetPlayerCheckpoint(playeridFedexPoints[rand][0], FedexPoints[rand][1], FedexPoints[rand][2], FedexPoints[rand][3], FedexPoints[rand][4], 3.0); // <---- Error here 
Help would be appreciated :/
Reply
#2

Quote:

SetPlayerCheckpoint(playerid, FedexPoints[rand][0], FedexPoints[rand][1], FedexPoints[rand][2], 3.0); // <---- Error here

here you go

btw why are you using
Quote:

FedexPoints[rand][3]

and
Quote:

FedexPoints[rand][4]

what these are for as SetPlayerCheckpoint only use below pattern

Quote:

(playerid, Float, Float:y, Float:z, Floatize)

Reply
#3

Lol Thanks , No idea why did I add 3 , 4 xD - Repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)