Рекомендованные сообщения



Не найдено.

1 post in this topic

Скажу вкратце что произошло: Я взял под основу мод Russia RP/Active RP и мне не понравилась, что на сервере присутствует раздача рублей и админ прав. Я пролистал мод и удалил всё что связанно с раздачей. После компиляции у меня вылезло куча предупреждений (( warning 219 )) связанных и с инклудом nex-ac и самим модом. Прошу помочь мне решить эту проблему.

 

Что на счет кода? Так я скажу, что проблема выскакивает в каждой строке в которой прописано "vehicleid".

Спойлер

PAWN Compiler Output:

C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(914) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(942) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1170) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1186) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1606) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1632) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1655) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1670) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1685) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1692) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1698) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1712) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1729) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(1738) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2022) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2024) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2026) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2028) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2030) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2272) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2761) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2763) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2797) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2799) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2815) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2817) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2833) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2835) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2851) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2853) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2869) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2871) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2888) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2890) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2907) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2909) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2925) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2927) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2943) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(2945) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(3330) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(3340) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(3350) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(3360) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(3370) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(5887) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(5962) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(6966) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7019) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7060) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7102) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7155) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7485) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7526) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7639) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(7923) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8735) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8742) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8751) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8760) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8767) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8776) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(8813) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(2765) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(3853) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(3860) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(3877) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(3886) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(4302) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(25529) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(25996) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(29458) : symbol is assigned a value that is never used: "output"
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(31095) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(31737) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(31742) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(31865) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(31924) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(32507) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(32594) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(32620) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(32721) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46043) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46047) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46081) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46098) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46115) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(46414) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\gamemodes\freteksel.pwn(47336) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Users\Tatiana\OneDrive\Рабочий столервер\pawno\include\nex-ac.inc(912) : symbol is never used: "vehicleid"
Pawn compiler 3.2.3664              Copyright (c) 1997-2017, ITB CompuPhase


87 Warnings.


КОД (( скину не всё, а только часть из мода и инклуда)):



МОД:



}
new GREENZONE[100][grzone], TOTALZONE = 0;

forward IsVehicleOccupied(vehicleid);
public IsVehicleOccupied(vehicleid)
{
    foreach(Player,i)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return true;
    }
    return false;
}
stock Float:GetDistanceBetweenPlayers(p1,p2)
{
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.00;
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}





//////////////////////////////////////////////////////////////////////



stock DestroyVehicleEx(vehicleid)
{
    if(Iter_Contains(valid_vehicles, vehicleid))
        Iter_Remove(valid_vehicles, vehicleid);
    return DestroyVehicle(vehicleid);
}

stock SetVehicleEE(vehicleid, Float: X, Float: Y, Float: Z)
{
    VEHICLE[vehicleid -1][v_X] = X;
    VEHICLE[vehicleid -1][v_Y] = Y;
    VEHICLE[vehicleid -1][v_Z] = Z;
    foreach(Player,i)
    {
        if (IsPlayerConnected(i) && IsPlayerInVehicle(i, vehicleid))
        {
            PlayerInfo[pPos_x] = X;
            PlayerInfo[pPos_y] = Y;
            PlayerInfo[pPos_z] = Z;
            break;
           }
     }
    return SetVehiclePos(vehicleid, X, Y, Z);

 

////////////////////////////////////////////////////////////////////////////////////////////////////

 

stock SetVehicleZAngleEx(vehicleid, Float: Angle)
{
    VEHICLE [ vehicleid - 1 ][ v_A ] = Angle;
    SetVehicleZAngle(vehicleid, Angle);
    return true;
}

 

ИНКЛУД:

 

ac_fpublic ac_AddStaticVehicle(vehicleid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle)
{
    ACVehInfo[vehicleid][acInt] =
    ACVehInfo[vehicleid][acSpeed] =
    ACVehInfo[vehicleid][acTires] =
    ACVehInfo[vehicleid][acDoors] =
    ACVehInfo[vehicleid][acPanels] =
    ACVehInfo[vehicleid][acLastSpeed] =
    ACVehInfo[vehicleid][acSpeedDiff] = 0;
    ACVehInfo[vehicleid][acPaintJob] = 3;
    ACVehInfo[vehicleid][acSpawned] = true;
    ACVehInfo[vehicleid][acHealth] = 1000.0;
    ACVehInfo[vehicleid][acPosDiff] =
    ACVehInfo[vehicleid][acVelX] =
    ACVehInfo[vehicleid][acVelY] =
    ACVehInfo[vehicleid][acVelZ] = 0.0;
    ACVehInfo[vehicleid][acSpawnPosX] =
    ACVehInfo[vehicleid][acPosX] = spawn_x;
    ACVehInfo[vehicleid][acSpawnPosY] =
    ACVehInfo[vehicleid][acPosY] = spawn_y;
    ACVehInfo[vehicleid][acSpawnPosZ] =
    ACVehInfo[vehicleid][acPosZ] = spawn_z;
    ACVehInfo[vehicleid][acSpawnZAngle] =
    ACVehInfo[vehicleid][acZAngle] = z_angle;
    ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
    return 1;
}

 

///////////////////////////////////////////////////////////////////////

 

ac_fpublic ac_CreateVehicle(vehicleid, modelid, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation)
{
    ACVehInfo[vehicleid][acInt] =
    ACVehInfo[vehicleid][acSpeed] =
    ACVehInfo[vehicleid][acTires] =
    ACVehInfo[vehicleid][acDoors] =
    ACVehInfo[vehicleid][acPanels] =
    ACVehInfo[vehicleid][acLastSpeed] =
    ACVehInfo[vehicleid][acSpeedDiff] = 0;
    ACVehInfo[vehicleid][acPaintJob] = 3;
    ACVehInfo[vehicleid][acHealth] = 1000.0;
    ACVehInfo[vehicleid][acPosDiff] =
    ACVehInfo[vehicleid][acVelX] =
    ACVehInfo[vehicleid][acVelY] =
    ACVehInfo[vehicleid][acVelZ] = 0.0;
    ACVehInfo[vehicleid][acSpawnPosX] =
    ACVehInfo[vehicleid][acPosX] = ac_x;
    ACVehInfo[vehicleid][acSpawnPosY] =
    ACVehInfo[vehicleid][acPosY] = ac_y;
    ACVehInfo[vehicleid][acSpawnPosZ] =
    ACVehInfo[vehicleid][acPosZ] = ac_z;
    ACVehInfo[vehicleid][acSpawnZAngle] =
    ACVehInfo[vehicleid][acZAngle] = ac_rotation;
    if(!ac_IsATrainCarriage(modelid)) ACVehInfo[vehicleid][acSpawned] = true;
    ACVehInfo[vehicleid][acDriver] = INVALID_PLAYER_ID;
    return 1;
}
 

//////////////////////////////////////////////////////////////////////////////

 

stock ac_GetVehicleZAngle(vehicleid, &Float:z_angle)
{
    if(!GetVehicleZAngle(vehicleid, z_angle)) return 0;
    if(z_angle != z_angle) z_angle = 0.0;
    z_angle = ac_AbsoluteAngle(z_angle);
    #undef ac_AbsoluteAngle
    return 1;
}

 

 

 

Я скинул по три места в коде, где присутствует vehicleid а значит и ошибка. Буду рад любой помощи!)

Edited by Jawn

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Dworkin
      By Dworkin
      Привет. Мне тяжело дается понимание строк в pawn из за не динамических массивов.
      #include enum pInfo { pRangName[25] } new players[MAX_PLAYERS][pInfo]; new string[20]; main() { format(string, sizeof(string), "Салага"); printf(string); players[0][pRangName] = string; } выдает ошибку "error 047: array sizes do not match, or destination array is too small" на строку "players[0][pRangName] = string;"
      Я понимаю что в ошибке говорится что размер не совпадает, но не могу понять как это сделать в павне