Script Erors Help
#1

How to fix it?

PHP код:
D:\games\Role Playe GM\Need For Speed RP BUG AR system\gamemodes\nfs.pwn(3951) : error 032: array index out of bounds (variable "PlayerVehicleInfo")
D:\games\Role Playe GM\Need For Speed RP BUG AR system\gamemodes\nfs.pwn(3951) : error 029invalid expressionassumed zero
D
:\games\Role Playe GM\Need For Speed RP BUG AR system\gamemodes\nfs.pwn(3951) : warning 215expression has no effect
D
:\games\Role Playe GM\Need For Speed RP BUG AR system\gamemodes\nfs.pwn(3951) : error 001expected token";"but found "]"
D:\games\Role Playe GM\Need For Speed RP BUG AR system\gamemodes\nfs.pwn(3951) : fatal error 107too many error messages on one line 

PHP код:
public OnPlayerModelSelection(playeridresponselistidmodelid)
{
    new 
string[128];
    new 
vslot vslotselection[playerid];
    if(
listid == vtoylist)
    {
        if(
response)
        {
                    new 
GetPlayerVehicle(playeridGetPlayerVehicleID(playerid));
                    if(
!= -1)
                    {
                        new 
Float:pXFloat:pYFloat:pZFloat:pA;
                        if(
vslot == 999) return SendClientMessage(playeridCOLOR_GREY"Anda belum memilih Slot.");
                        
                        
PlayerVehicleInfo[playerid][v][pvToyID][vslot] = modelid/// (3951) IN THIS!
                        
GetPlayerPos(playeridpXpYpZ);
                        
GetVehicleZAngle(PlayerVehicleInfo[playerid][x][pvId], pA);
                        
PlayerVehicleInfo[playerid][y][pvToyPosX][vslot] = 0.00000;
                        
PlayerVehicleInfo[playerid][v][pvToyPosY][vslot] = 0.00000;
                        
PlayerVehicleInfo[playerid][v][pvToyPosZ][vslot] = 0.00000;
                        
PlayerVehicleInfo[playerid][v][pvToyRotX][vslot] = 0.00000;
                        
PlayerVehicleInfo[playerid][v][pvToyRotY][vslot] = 0.00000;
                        
PlayerVehicleInfo[playerid][v][pvToyRotZ][vslot] = 0.00000;
                          
PlayerVehicleInfo[playerid][v][pvToy][vslot] = CreateObject(modelid,pX,pY,pZ,0,0,pA);
                        
pvEdit[playerid] = 1;
                        
pvEditID[playerid] = vslotselection[playerid];
                        
pvehEditID[playerid] = v;
                        
format(stringsizeof(string), "Edit Vehicle ID slot: %d"x);
                        
SendClientMessageEx(playeridCOLOR_WHITEstring);
                        
GetObjectPos(PlayerVehicleInfo[playerid][v][pvToy][vslot], pvPos[playerid][0], pvPos[playerid][1], pvPos[playerid][2]);
                        
GetObjectRot(PlayerVehicleInfo[playerid][v][pvToy][vslot], pvRot[playerid][0], pvRot[playerid][1], pvRot[playerid][2]);
                        
EditObject(playeridPlayerVehicleInfo[playerid][v][pvToy][vslot]);
                        
SendClientMessage(playeridCOLOR_WHITE"Selamat. Anda telah membeli Vehicle Object, Gunakan (/editvtoys) untuk mengaturnya.");
                        return 
1;
                    }
        }
    }
    new 
id PlayerInfo[playerid][pInBizz];
    if(
listid == skinlist)
    {
        if(
response)
        {
            
SendClientMessageEx(playerid0xFF0000FF"Skin Changed");
               if(
BizzInfo[id][bClothes] <= 0) { SendClientMessageEx(playerid,COLOR_RED,"Produk Habis."); return 1; }
              if(
GetPlayerCash(playerid) < BizzInfo[id][bProductPrice1]) return SendClientMessageEx(playeridCOLOR_GRAD2"You can't afford these clothes!");
            
GivePlayerCash(playerid, -BizzInfo[id][bProductPrice1]);
            
BizzInfo[id][bTill] += BizzInfo[id][bProductPrice1];
            
BizzInfo[id][bClothes] -= 1;
            
PlayerInfo[playerid][pModel] = modelid;
            
SetPlayerSkin(playeridmodelid);
        }
        else 
SendClientMessageEx(playerid0xFF0000FF"Canceled skin selection");
        return 
1;
    }
    return 
1;

Reply
#2

Show me how the enum and variable PlayerVehicleInfo is defined.
Reply
#3

This?? Or

PHP код:
enum pvInfo
{
    
pvNeon,
    
pvNeonObj,
    
pvNeonObj2,
    
pvNeonObj3,
    
pvNeonObj4,
    
pvToy[MAX_OBJECTS_PER_PLAYER],
    
pvToyID[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyPosX[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyPosY[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyPosZ[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyRotX[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyRotY[MAX_OBJECTS_PER_PLAYER],
    
Float:pvToyRotZ[MAX_OBJECTS_PER_PLAYER],
    
pvToyColor[MAX_OBJECTS_PER_PLAYER],
    
pvToyIndex[MAX_OBJECTS_PER_PLAYER],
    
pvToyTexture1[MAX_OBJECTS_PER_PLAYER],
    
pvToyTexture2[MAX_OBJECTS_PER_PLAYER],
    
pvToyTextureID[MAX_OBJECTS_PER_PLAYER],
    
pvToyTextID1,
    
pvToyTextID2,
    
pvToyTextID3,
    
pvToyTextID4,
    
pvToyTextID5,
    
pvToyTextID6,
    
pvToyTextID7,
    
pvToyTextID8,
    
pvToyTextID9,
    
pvToyTextID10,
    
pvToyText1[128],
    
pvToyText2[128],
    
pvToyText3[128],
    
pvToyText4[128],
    
pvToyText5[128],
    
pvToyText6[128],
    
pvToyText7[128],
    
pvToyText8[128],
    
pvToyText9[128],
    
pvToyText10[128],
    
pvToyTextCol1,
    
pvToyTextCol2,
    
pvToyTextCol3,
    
pvToyTextCol4,
    
pvToyTextCol5,
    
pvToyTextCol6,
    
pvToyTextCol7,
    
pvToyTextCol8,
    
pvToyTextCol9,
    
pvToyTextCol10,
    
pvToyTextSize1,
    
pvToyTextSize2,
    
pvToyTextSize3,
    
pvToyTextSize4,
    
pvToyTextSize5,
    
pvToyTextSize6,
    
pvToyTextSize7,
    
pvToyTextSize8,
    
pvToyTextSize9,
    
pvToyTextSize10,
    
Float:pvPosX,
    
Float:pvPosY,
    
Float:pvPosZ,
     
Float:pvPosAngle,
    
pvId,
    
pvModelId,
    
pvLock,
    
pvLocked,
    
pvPaintJob,
    
pvColor1,
    
pvColor2,
    
pvMods[MAX_MODS],
    
pvAllowPlayer[MAX_PLAYER_NAME],
    
pvAllowedPlayerId,
    
pvPark,
    
pvNumberPlate[32], // sz //Plate
    
pvPrice,
    
pvTicket,
    
pvWeapons[3],
    
pvWeaponsAmmo[3],
    
pvWepUpgrade,
    
pvImpounded,
    
FloatpvFuel,
    
FloatpvHealth,
    
pvStatus[4],
    
pvInsurances
};
new 
PlayerVehicleInfo[MAX_PLAYERS+1][MAX_PLAYERVEHICLES][pvInfo]; 
Reply
#4

Try this:
PHP код:
                        PlayerVehicleInfo[playerid][y][vslot][pvToyPosX] = 0.00000
                        
PlayerVehicleInfo[playerid][v][vslot][pvToyPosY] = 0.00000
                        
PlayerVehicleInfo[playerid][v][vslot][pvToyPosZ] = 0.00000
                        
PlayerVehicleInfo[playerid][v][vslot][pvToyRotX] = 0.00000
                        
PlayerVehicleInfo[playerid][v][vslot][pvToyRotY] = 0.00000
                        
PlayerVehicleInfo[playerid][v][vslot][pvToyRotZ] = 0.00000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)