onplayerpicukup...
#1

hey. what the problem with this?
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == hpickup[ClosestHouse(playerid)])
    {
        new 
azonosito ClosestHouse(playerid);
        new 
string[128], string1[128];
        
format(string,sizeof(string),"%s"HouseInfo[azonosito][hTulaj]);
        
PlayerTextDrawSetString(playerid,HazNev,string);
        
format(string1,sizeof(string1),"Fort Carson %i"HouseInfo[azonosito][hID]);
        
PlayerTextDrawSetString(playerid,HazSzam,string1);
        
PlayerTextDrawShow(playeridPlayerText:HazNev);
        
PlayerTextDrawShow(playeridPlayerText:HazBox);
        
PlayerTextDrawShow(playeridPlayerText:HazSzam);
        
SetTimerEx("haztextdraw"15000false"i"playerid);
    }
    return 
1;

PHP код:
stock ClosestHouse(playerid)
{
  for(new 
i=0i<MAX_HOUSESi++)
  {
    if(
IsPlayerInRangeOfPoint(playerid,1.0,HouseInfo[i][hEnterX] ,HouseInfo[i][hEnterY],HouseInfo[i][hEnterZ]))
    {
      return 
i;
    }
  }
  return -
10;

PHP код:
[21:32:20] [debugRun time error 4"Array index out of bounds"
[21:32:20] [debug]  Accessing element at negative index -10
[21:32:20] [debugAMX backtrace:
[
21:32:20] [debug#0 0005a440 in ?? (0x00000000, 0x00000001) from rrrpg.amx
[21:32:20] [debug#1 000156a8 in public Streamer_OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx
[21:32:20] [debug#2 0000fd10 in public OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx
[21:32:21] [debugRun time error 4"Array index out of bounds"
[21:32:21] [debug]  Accessing element at negative index -10
[21:32:21] [debugAMX backtrace:
[
21:32:21] [debug#0 0005a440 in ?? (0x00000000, 0x00000001) from rrrpg.amx
[21:32:21] [debug#1 000156a8 in public Streamer_OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx
[21:32:21] [debug#2 0000fd10 in public OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx
[21:32:22] [debugRun time error 4"Array index out of bounds"
[21:32:22] [debug]  Accessing element at negative index -10
[21:32:22] [debugAMX backtrace:
[
21:32:22] [debug#0 0005a440 in ?? (0x00000000, 0x00000001) from rrrpg.amx
[21:32:22] [debug#1 000156a8 in public Streamer_OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx
[21:32:22] [debug#2 0000fd10 in public OnPlayerPickUpPickup (0x00000000, 0x00000001) from rrrpg.amx 
Reply


Messages In This Thread
onplayerpicukup... - by n00el - 21.05.2014, 19:15
Re: onplayerpicukup... - by Koala818 - 21.05.2014, 19:25
Re: onplayerpicukup... - by n00el - 21.05.2014, 19:49
Re: onplayerpicukup... - by n00el - 21.05.2014, 19:55
Re: onplayerpicukup... - by EgyptForLife - 21.05.2014, 20:00
Re: onplayerpicukup... - by iZN - 21.05.2014, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)