Need some help with warnings
#1

Код:
pcrp\admin.pwn(3749) : warning 213: tag mismatch
pawn Код:
new EAdminlags:aflags = EAdminFlags:GetPVarInt(editingadmin, "AdminFlags");
Код:
pcrp\interiors.pwn(278) : warning 209: function "interiorTryEnterExit" should return a value
pawn Код:
interiorTryEnterExit(playerid) {
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 670.429384, -1364.777465, -24.148437)) { //san news entrance
        SetPlayerPos(playerid, 660.809082, -1345.254394, -57.424999);
        SetPlayerFacingAngle(playerid, 93.389938);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
        return 1;
    } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 660.809082, -1345.254394, -57.424999)) {
        SetPlayerFacingAngle(playerid, 271.678344);
        SetPlayerPos(playerid, 670.429384, -1364.777465, -24.148437);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
    }
    for(new i=0;i<sizeof(Interiors);i++) {
        if(Interiors[i][ESQLID] != 0) {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ])) {
                if(Interiors[i][EInteriorFreeze]) {
                    showHelpText(playerid, "You are being frozen to wait for the objects to stream.");
                    TogglePlayerControllableEx(playerid, 0);
                    SetTimerEx("SetControllable",2500,false,"dd",playerid,1);
                }
                SetPlayerPos(playerid, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ]);
                SetPlayerInterior(playerid, Interiors[i][EInteriorInt]);
                SetPlayerVirtualWorld(playerid, Interiors[i][EInteriorVW]);
                if(Interiors[i][EInteriorAngle] != 0.0){
                    SetPlayerFacingAngle(playerid, Interiors[i][EInteriorAngle]);
                }
            } else if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ])) {
                if(GetPlayerVirtualWorld(playerid) == Interiors[i][EInteriorVW]) {
                    SetPlayerPos(playerid, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ]);
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                }
            }
        }
    }
}
Can anyone help me fix this?
Reply
#2

about this
pawn Код:
pcrp\interiors.pwn(278) : warning 209: function "interiorTryEnterExit" should return a value
you were missing return 1;

try this
pawn Код:
interiorTryEnterExit(playerid) {
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 670.429384, -1364.777465, -24.148437)) { //san news entrance
        SetPlayerPos(playerid, 660.809082, -1345.254394, -57.424999);
        SetPlayerFacingAngle(playerid, 93.389938);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
        return 1;
    } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 660.809082, -1345.254394, -57.424999)) {
        SetPlayerFacingAngle(playerid, 271.678344);
        SetPlayerPos(playerid, 670.429384, -1364.777465, -24.148437);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
    }
    for(new i=0;i<sizeof(Interiors);i++) {
        if(Interiors[i][ESQLID] != 0) {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ])) {
                if(Interiors[i][EInteriorFreeze]) {
                    showHelpText(playerid, "You are being frozen to wait for the objects to stream.");
                    TogglePlayerControllableEx(playerid, 0);
                    SetTimerEx("SetControllable",2500,false,"dd",playerid,1);
                }
                SetPlayerPos(playerid, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ]);
                SetPlayerInterior(playerid, Interiors[i][EInteriorInt]);
                SetPlayerVirtualWorld(playerid, Interiors[i][EInteriorVW]);
                if(Interiors[i][EInteriorAngle] != 0.0){
                    SetPlayerFacingAngle(playerid, Interiors[i][EInteriorAngle]);
                }
            } else if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ])) {
                if(GetPlayerVirtualWorld(playerid) == Interiors[i][EInteriorVW]) {
                    SetPlayerPos(playerid, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ]);
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                }
            }
        }
    }
    return 1;
}
Reply
#3

***oops
Reply
#4

pawn Код:
interiorTryEnterExit(playerid) {
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 670.429384, -1364.777465, -24.148437)) { //san news entrance
        SetPlayerPos(playerid, 660.809082, -1345.254394, -57.424999);
        SetPlayerFacingAngle(playerid, 93.389938);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
        return 1;
    } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 660.809082, -1345.254394, -57.424999)) {
        SetPlayerFacingAngle(playerid, 271.678344);
        SetPlayerPos(playerid, 670.429384, -1364.777465, -24.148437);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerInterior(playerid, 1);
    }
    for(new i=0;i<sizeof(Interiors);i++) {
        if(Interiors[i][ESQLID] != 0) {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ])) {
                if(Interiors[i][EInteriorFreeze]) {
                    showHelpText(playerid, "You are being frozen to wait for the objects to stream.");
                    TogglePlayerControllableEx(playerid, 0);
                    SetTimerEx("SetControllable",2500,false,"dd",playerid,1);
                }
                SetPlayerPos(playerid, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ]);
                SetPlayerInterior(playerid, Interiors[i][EInteriorInt]);
                SetPlayerVirtualWorld(playerid, Interiors[i][EInteriorVW]);
                if(Interiors[i][EInteriorAngle] != 0.0){
                    SetPlayerFacingAngle(playerid, Interiors[i][EInteriorAngle]);
                }
            } else if(IsPlayerInRangeOfPoint(playerid, 3.0, Interiors[i][EInteriorX], Interiors[i][EInteriorY], Interiors[i][EInteriorZ])) {
                if(GetPlayerVirtualWorld(playerid) == Interiors[i][EInteriorVW]) {
                    SetPlayerPos(playerid, Interiors[i][EEntranceInteriorX],Interiors[i][EEntranceInteriorY],Interiors[i][EEntranceInteriorZ]);
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                }
            }
        }
    }
    return 1;
}
Use this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)