Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Lucian

Помогите исправить ошибку Rpt

ArmA2OA.RPT

 

Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
String STR_EVAL_TYPENAN not found
Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number

 

 

Сам скрипт откуда летит ошибка:

 

Humanity_Trader_Pay = 
    {
        private ["_humanity","_price","_success"];
        _humanity     = player getVariable ['humanity', 0];
        _price         = _this;
        _success     = false;
        if (_humanity == 0) then 
            {
                "Недостаточно человечности." call dayz_rollingMessages;
            };
        if (_humanity > 0) then 
            {
                if (_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity - _price;
                        _success = true;
                    };
            };
        if (_humanity < 0) then 
            {
                if (-_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity + _price;
                        _success = true;
                    };
            };
        player setVariable ["humanity", _humanity, true];
        _success;
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Pay";

 

 

Сам скрипт торговли за человечность работает, и в рпт сервера ошибок не наблюдается, но есть ошибка в клиентском рпт.

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

попробуйте заменить

"Недостаточно человечности."

на

_message = format ["Недостаточно человечности."];

и уже вместо

 "Недостаточно человечности."

ниже используйте

_message

 

Share this post


Link to post
Share on other sites



  • 0

123new Бред.

 

У него ошибка, что ИДЕТ МАССИВ, а ожидалось число.

 

{ "Недостаточо   Error <: Type Array, expected Number

 

При сравнении

"   Error position: << _price) then 

 

=> хер его знает, что у него в _price

А для того чтобы понять, уже 100500 раз писали - делайте diag_log , но всем же влом выучить хотя бы 1 единственную команду, чтобы посмотреть, что там такое в скрипте

Банальщина -

после

 _price         = _this;

добавить

diag_log(format["_humanity:%1, _price: %2", _humanity, _price]);

как же тяжко наверное разобраться как создавать диагностику? А потом глянуть в РПТ, и я ВАНГУЮ, что там будет

_humanity: xxx, _price: [yyy]

вместо ххх, и yyy число. - только вот вангую yyy будет именно массивом.

Share this post


Link to post
Share on other sites
  • 0
21 минуту назад, NoNameUltima сказал:

=> хер его знает, что у него в _price

Humanity_Trader_Buy = 
    {
        private ["_control","_index","_item","_text","_price","_number","_pistolMags","_regularMags","_noSpace"];
        if (isNil "Humanity_Trader_Dialog_Mode") exitWith 
            {
                "Ошибка: Huamnity_Trader_Dialog_Mode обнулен." call dayz_rollingMessages;
            };
        _control                                 = ((findDisplay 11600) displayCtrl 11601);
        _index                                     = lnbCurSelRow _control;
        if (_index == -1) exitWith 
            {
                "Выберите предмет для покупки." call dayz_rollingMessages;
            };
        _item                                      = _control lnbData [_index, 0];
        _text                                      = _control lnbText [_index, 0];
        _price                                     = parseNumber (_control lnbText [_index, 1]);
        "Совершается покупка." call dayz_rollingMessages;
        switch (Humanity_Trader_Dialog_Mode) do 
            {
                 case "Weapon": 
                    {
                        _number = getNumber (configFile >> "CfgWeapons" >> _item >> "type");
                        if (_number == 1 || _number == 5) then 
                            {
                                if (primaryWeapon player == "") then 
                                    {
                                        if (_price call Humanity_Trader_Pay) then 
                                            {
                                                    player addWeapon _item;
                                                    format ["%1 куплен.",_item] call dayz_rollingMessages;
                                            };
                                    } 
                                else 
                                    {
                                        if (dayz_onBack == "") then 
                                            {
                                                if (_price call Humanity_Trader_Pay) then 
                                                    {
                                                        dayz_onBack = _item;
                                                        call player_forceSave;
                                                        format ["%1 куплен.",_item] call dayz_rollingMessages;
                                                    };
                                            } 
                                        else 
                                            {
                                                "Нет места для покупки, освободите слот оружия." call dayz_rollingMessages;
                                            };
                                    };
                            };
                        if (_number == 4) then 
                            {
                                if (secondaryWeapon player == "") then 
                                    {
                                        if (_price call Humanity_Trader_Pay) then 
                                            {
                                                player addWeapon _item;
                                                format ["%1 куплен.",_item] call dayz_rollingMessages;
                                            };
                                    } 
                                else 
                                    {
                                        "Нет места для покупки, освободите слот оружия." call dayz_rollingMessages;
                                    };
                            };
                    };
                case "Ammo": 
                    {
                        _pistolMags     = 0;
                        _regularMags     = 0; 
                            {
                                _number = getNumber (configFile >> "CfgMagazines" >> _x >> "type");
                                if (_number == 16) then 
                                    { 
                                        _pistolMags = _pistolMags + 1; 
                                    };
                                if (_number == 256) then 
                                    { 
                                        _regularMags = _regularMags + 1; 
                                    };
                                if (_number == 512) then 
                                    { 
                                        _regularMags = _regularMags + 2; 
                                    };
                            } count (magazines player);
                        _number = getNumber (configFile >> "CfgMagazines" >> _item >> "type");
                        _noSpace = false;
                        if (_number == 16 and _pistolMags >= 8) then 
                            {
                                "Нет места для покупки, освободите слот пистолетных патронов." call dayz_rollingMessages;
                                _noSpace = true;
                            };
                        if (_number == 256 and _regularMags >= 12) then 
                            {
                                "Нет места для покупки, освободите один слот инвентаря." call dayz_rollingMessages;
                                _noSpace = true;
                            };
                        if (_number == 512 and _regularMags >= 11) then 
                            {
                                "Нет места для покупки, освободите два слота инвентаря." call dayz_rollingMessages;
                                _noSpace = true;
                            };
                        if (!_noSpace) then 
                            {
                                if (_price call Humanity_Trader_Pay) then 
                                    {
                                        player addMagazine _item;
                                        format ["%1 куплен.",_item] call dayz_rollingMessages;
                                    };
                            };
                    };
                default 
                    { 
                        "Ошибка: Humanity_Trader_Dialog_Mode имеет неизвестное значение." call dayz_rollingMessages;
                    };
            };
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Buy";
Humanity_Trader_Ammo = 
    {
        disableSerialization;
        private ["_control","_pic","_text","_array","_price","_humanity"];
        _array = 
            [
                ["AT13",100],
                ["Javelin",100],
                ["Stinger",100],
                ["Strela",100],
                ["Igla",100],
                ["Dragon_EP1",100],
                ["3rnd_Anzio_20x102mm",20]
            ];
        _control                               = ((findDisplay 11600) displayCtrl 11601);
        lnbClear _control;
            {
                _pic                          = (getText (configFile >> 'CfgMagazines' >> (_x select 0) >> 'picture'));
                _text                          = (getText (configFile >> 'CfgMagazines' >> (_x select 0) >> 'displayName'));
                _price                     = _x select 1;
                _humanity                     = player getVariable ['humanity', 0];
                if (_humanity > 0) then 
                    {
                        _price           = round (_price * 0.50);
                    };
                _control lnbAddRow [ _text , str(_price)];
                _control lnbSetPicture [[_foreachIndex, 0], _pic];
                _control lnbSetData    [[_foreachIndex, 0], _x select 0];
            } forEach _array;
        _control lnbSetCurSelRow -1;
        Humanity_Trader_Dialog_Mode     = "Ammo";
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Ammo";
Humanity_Trader_Weapons = 
    {
        disableSerialization;
        private ["_control","_pic","_text","_array","_price","_humanity"];
        _array = 
            [
                ["MetisLauncher",10000],
                ["Javelin",7500],
                ["Stinger",7500],
                ["Strela",7500],
                ["Igla",7500],
                ["M47Launcher_EP1",5000],
                ["Anzio_20_DZ",5000],
                ["BAF_AS50_TWS",10000],
                ["m107_TWS_EP1",7500],
                ["M110_TWS_EP1",5000],
                ["M249_TWS_EP1_Small",3500],
                ["AKS_74_GOSHAWK",2500]
                
            ];
        _control                         = ((findDisplay 11600) displayCtrl 11601);
        lnbClear _control;
            {
                _pic                     = (getText (configFile >> 'CfgWeapons' >> (_x select 0) >> 'picture'));
                _text                     = (getText (configFile >> 'CfgWeapons' >> (_x select 0) >> 'displayName'));    
                _price                     = _x select 1;
                _humanity                 = player getVariable ['humanity', 0];
                if (_humanity > 0) then 
                    {
                        _price             = round (_price * 0.50);
                    };
                _control lnbAddRow [ _text , str(_price)];
                _control lnbSetPicture [[_foreachIndex, 0], _pic];
                _control lnbSetData    [[_foreachIndex, 0], _x select 0];
            } forEach _array;
        _control lnbSetCurSelRow -1;
        Humanity_Trader_Dialog_Mode     = "Weapon";


    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Weapons";

добавить

diag_log(format["_humanity:%1, _price: %2", _humanity, _price]);

 

5 сек

Edited by Lucian (see edit history)

Share this post


Link to post
Share on other sites
  • 0

String STR_EVAL_TYPENAN not found
Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_humanity:19670, _price: 10"
"_humanity:19660, _price: 10"

 

насколько я понял ошибка рисуется из-за того что у героев цена делится на пополам чтоли.

Edited by Lucian (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Lucian после добовления того что сказал товарищ NoNameUltima  должно появиться у вас в rpt следующее:

_humanity:{значение} , _price:{значение}

появились строки с такими переменными? если да, выложите

Share this post


Link to post
Share on other sites
  • 0
1 минуту назад, 123new сказал:

Lucian после добовления того что сказал товарищ NoNameUltima  должно появиться у вас в rpt следующее:

_humanity:{значение} , _price:{значение}

появились строки с такими переменными? если да, выложите

String STR_EVAL_TYPENAN not found
Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_humanity:19670, _price: 10"
"_humanity:19660, _price: 10"

Share this post


Link to post
Share on other sites
  • 0

1.

"Недостаточно человечности." call dayz_rollingMessages;

замени на

["Недостаточно человечности.",1] call dayz_rollingMessages;

 

2.

STR_EVAL_TYPENAN нет в stringTables

 

3.

Добавляй диаг_лог после каждого условия - типа

 

diag_log("Тест1");

...

diag_log("Тест2");

 

и смотри РПТ - после какой строки диага, начинает сыпаться ошибка.

нумеруй диаг, чтоб точно понять, после какой строки кода.

Добавь штук 20, раз определить не можешь, где и что

Share this post


Link to post
Share on other sites
  • 0

Lucian Не понятно, почему у тебя диагностика появилась НИЖЕ. Я же написал - в какое место добавить диаг.

А у тебя ошибки при выполнении скрипта идут выше диага......=> или скрипт у тебя другой, или не в нем ошибки то.

Edited by NoNameUltima (see edit history)

Share this post


Link to post
Share on other sites
  • 0
39 минут назад, NoNameUltima сказал:

Lucian Не понятно, почему у тебя диагностика появилась НИЖЕ. Я же написал - в какое место добавить диаг.

А у тебя ошибки при выполнении скрипта идут выше диага......=> или скрипт у тебя другой, или не в нем ошибки то.

Humanity_Trader_Pay = 
    {
        private ["_humanity","_price","_success"];
        _humanity     = player getVariable ['humanity', 0];
        _price         = _this;
        diag_log(format["_humanity:%1, _price: %2", _humanity, _price]);
        _success     = false;
        if (_humanity == 0) then 
            {
                "Недостаточно человечности." call dayz_rollingMessages;
            };
        if (_humanity > 0) then 
            {
                if (_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity - _price;
                        _success = true;
                    };
            };
        if (_humanity < 0) then 
            {
                if (-_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity + _price;
                        _success = true;
                    };
            };
        player setVariable ["humanity", _humanity, true];
        _success;
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Pay";

 

 

вот так поставил

Edited by Lucian (see edit history)

Share this post


Link to post
Share on other sites
  • 0
11 минуту назад, NoNameUltima сказал:

Lucian Ну если так поставил, то в РПТ у тебя диаг должен быть выше ошибок.

я скорее всего не то скопировал! вернее не полностью

 

"_humanity:19670, _price: [B 1-1-C:1 (Lucian),B 1-1-C:1 (Lucian),2,Agent 0x2731c400]"
String STR_EVAL_TYPENAN not found
Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_humanity:19670, _price: 10"
"_humanity:19660, _price: 10"

Share this post


Link to post
Share on other sites
  • 0

Ну вот тебе и ответ

[B 1-1-C:1 (Lucian),B 1-1-C:1 (Lucian),2,Agent 0x2731c400]"

 

прайс у тебя это массив.

так что вместо

_price = _this;

писать надо

_price = _this select 2;

это на вскиду, если цена конечно - 2. судя по массиву....

 

А вообще смотрите уже на ютубе ролики, по скриптингу. переменные\массивы\функции и процедуры.

 

Edited by NoNameUltima (see edit history)

Share this post


Link to post
Share on other sites
  • 0
3 минуты назад, XcoreDMT сказал:

Знакомый скрипт

ага в сборке уникальной от yahweh был.

Share this post


Link to post
Share on other sites
  • 0
22 минуты назад, NoNameUltima сказал:

Ну вот тебе и ответ

[B 1-1-C:1 (Lucian),B 1-1-C:1 (Lucian),2,Agent 0x2731c400]"

 

прайс у тебя это массив.

так что вместо

_price = _this;

писать надо

_price = _this select 2;

это на вскиду, если цена конечно - 2. судя по массиву....

 

А вообще смотрите уже на ютубе ролики, по скриптингу. переменные\массивы\функции и процедуры.

 

Humanity_Trader_Pay = 
    {
        private ["_humanity","_price","_success"];
        _humanity     = player getVariable ['humanity', 0];
        _price            = _this select 2;
        diag_log(format["_humanity:%1, _price: %2", _humanity, _price]);
        _success     = false;
        if (_humanity == 0) then 
            {
                "Недостаточно человечности." call dayz_rollingMessages;
            };
        if (_humanity > 0) then 
            {
                if (_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity - _price;
                        _success = true;
                    };
            };
        if (_humanity < 0) then 
            {
                if (-_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity + _price;
                        _success = true;
                    };
            };
        player setVariable ["humanity", _humanity, true];
        _success;
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Pay";

 

 

Перестал работать скрипт, я правльно подставил то хоть? 

 

рпт 

"_humanity:19624, _price: any"
Error in expression <(_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточно
  Error position: <_price) then 
{
"Недостаточно
  Error Undefined variable in expression: _price
Error in expression <Variable ['humanity', 0];
_price      =_this select 2;
diag_log(format["_humanity:>
  Error position: <_this select 2;
diag_log(format["_humanity:>
  Error Undefined variable in expression: _x
"_humanity:19624, _price: any"
"_humanity:19624, _price: any"
"_humanity:19624, _price: any"

Share this post


Link to post
Share on other sites
  • 0

у тебя в _this приходит хз что.

разбирайся, что там у тебя за сборка, и что тиам за бред приходит.

в амый верх скрипта добавь диаг для _this

Share this post


Link to post
Share on other sites
  • 0
30 минут назад, NoNameUltima сказал:

у тебя в _this приходит хз что.

разбирайся, что там у тебя за сборка, и что тиам за бред приходит.

в амый верх скрипта добавь диаг для _this

"_humanity:-12696, _price: 10000"
"_humanity:-12696, _price: 7500"
"_humanity:-12696, _price: 7500"
"_humanity:-12696, _price: 7500"
"_humanity:-12696, _price: 7500"
"_humanity:-12696, _price: 5000"
"_humanity:-12696, _price: 5000"
"_humanity:-12696, _price: 10000"
"_humanity:-12696, _price: 7500"
"_humanity:-12696, _price: 5000"
"_humanity:-12696, _price: 3500"
"_humanity:-12696, _price: 2500"
"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),2,Agent 0x420ee440]"
String STR_EVAL_TYPENAN not found
Error in expression < (_humanity < 0) then 
{
if (-_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 100"
"_humanity:-12696, _price: 20"
"_this: 20"
Cannot create non-ai vehicle c_grasstall,
"_humanity:-12676, _price: 10000"
"_humanity:-12676, _price: 7500"
"_humanity:-12676, _price: 7500"
"_humanity:-12676, _price: 7500"
"_humanity:-12676, _price: 7500"
"_humanity:-12676, _price: 5000"
"_humanity:-12676, _price: 5000"
"_humanity:-12676, _price: 10000"
"_humanity:-12676, _price: 7500"
"_humanity:-12676, _price: 5000"
"_humanity:-12676, _price: 3500"
"_humanity:-12676, _price: 2500"
"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),6,Agent 0x420ee440]"
String STR_EVAL_TYPENAN not found
Error in expression < (_humanity < 0) then 
{
if (-_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 100"
"_humanity:-12676, _price: 20"
"_this: 20"
"_humanity:-12656, _price: 10000"
"_humanity:-12656, _price: 7500"
"_humanity:-12656, _price: 7500"
"_humanity:-12656, _price: 7500"
"_humanity:-12656, _price: 7500"
"_humanity:-12656, _price: 5000"
"_humanity:-12656, _price: 5000"
"_humanity:-12656, _price: 10000"
"_humanity:-12656, _price: 7500"
"_humanity:-12656, _price: 5000"
"_humanity:-12656, _price: 3500"
"_humanity:-12656, _price: 2500"
"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),10,Agent 0x420ee440]"
String STR_EVAL_TYPENAN not found
Error in expression < (_humanity < 0) then 
{
if (-_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_this: 5000"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 100"
"_humanity:-7656, _price: 20"
"_this: 20"
"_this: 20"

 

 

сложновато))) прописал вот так:

Humanity_Trader_Pay = 
    {
        diag_log(format["_this: %1", _this]);
        private ["_humanity","_price","_success"];
        _humanity     = player getVariable ['humanity', 0];
        _price         = _this;
        _success     = false;
        if (_humanity == 0) then 
            {
                "Недостаточно человечности." call dayz_rollingMessages;
            };
        if (_humanity > 0) then 
            {
                if (_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity - _price;
                        _success = true;
                    };
            };
        if (_humanity < 0) then 
            {
                if (-_humanity < _price) then 
                    {
                        "Недостаточно человечности." call dayz_rollingMessages;
                    } 
                else 
                    {
                        _humanity = _humanity + _price;
                        _success = true;
                    };
            };
        player setVariable ["humanity", _humanity, true];
        _success;
    };    
(owner _playerObj) publicVariableClient "Humanity_Trader_Pay";

 

я уже ей богу голову сломал)) непонимаю уже ничего..

 

 

а вот лог но уже с покупки на геройском трейде

 

"_humanity:14884, _price: 5000"
"_humanity:14884, _price: 3750"
"_humanity:14884, _price: 3750"
"_humanity:14884, _price: 3750"
"_humanity:14884, _price: 3750"
"_humanity:14884, _price: 2500"
"_humanity:14884, _price: 2500"
"_humanity:14884, _price: 5000"
"_humanity:14884, _price: 3750"
"_humanity:14884, _price: 2500"
"_humanity:14884, _price: 1750"
"_humanity:14884, _price: 1250"
"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),20,Agent 0x414ee180]"
String STR_EVAL_TYPENAN not found
Error in expression <f (_humanity > 0) then 
{
if (_humanity < _price) then 
{
"Недостаточо
  Error position: << _price) then 
{
"Недостаточо
  Error <: Type Array, expected Number
"_this: 5000"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 50"
"_humanity:9884, _price: 10"
"_this: 10"
"_this: 10"

Edited by Lucian (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Lucian разбирайся не с самим скриптом этим а с тем скриптом, который вызывает этот, т.е. данные на этот скрипт тебе отправляет. Так как судя по тому что ты скидываешь у тебя сначала все хорошо, а потом в какой-то момент приходит такое

"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),2,Agent 0x420ee440]"

что и вызывает твою ошибку.
т.е. данные в неверном формате приходят в функцию. А вот откуда они приходят можешь понять лишь ты сам, анализируя какой из скриптов вызывает этот и откуда такая строка берется.

Share this post


Link to post
Share on other sites
  • 0
26 минут назад, 123new сказал:

Lucian разбирайся не с самим скриптом этим а с тем скриптом, который вызывает этот, т.е. данные на этот скрипт тебе отправляет. Так как судя по тому что ты скидываешь у тебя сначала все хорошо, а потом в какой-то момент приходит такое

"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),2,Agent 0x420ee440]"

что и вызывает твою ошибку.
т.е. данные в неверном формате приходят в функцию. А вот откуда они приходят можешь понять лишь ты сам, анализируя какой из скриптов вызывает этот и откуда такая строка берется.

 

а подскажите вот такую тему, если скрипты подключаются через server_playerLogin.sqf

 Dayz Epoch\@DayZ_Epoch_Server\addons\dayz_server\compile

 

подключаются в конце 

#include "custom\Humanity_Trader\Humanity_Trader_Ammo.sqf"
#include "custom\Humanity_Trader\Humanity_Trader_Weapons.sqf"
#include "custom\Humanity_Trader\Humanity_Trader_Buy.sqf"
#include "custom\Humanity_Trader\Humanity_Trader_Pay.sqf" 

 

то нужно ли что то прописывать в server_playerLogin.sqf в разделе 

private ["_playerID","_endMission","_0","_1","_timeleft","_doLoop","_key","_primary","_model","_inventory","_backpack","_survival","_CharacterCoins","_group","_playerCoins","_BankCoins","_hiveVer","_mags","_wpns","_bcpk","_config","_isInfected","_remaining","_playerObj","_playerName","_newPlayer","_isNew","_charID","_isHiveOk"];

 

 

Share this post


Link to post
Share on other sites
  • 0
3 часа назад, Lucian сказал:

"_this: [B 1-1-B:1 (Padla),B 1-1-B:1 (Padla),20,Agent 0x414ee180]"

_this select 2 выдаст 20.

а че он у тебя там выдает, когда ты заменил _this на _this select 2 ошибку я хз.

и написали же - добавь хоть 20 диагов, чтоб видеть после какой строки ошибка.

Share this post


Link to post
Share on other sites
  • 0
30 минут назад, NoNameUltima сказал:

_this select 2 выдаст 20.

а че он у тебя там выдает, когда ты заменил _this на _this select 2 ошибку я хз.

и написали же - добавь хоть 20 диагов, чтоб видеть после какой строки ошибка.

скрипт вообще работать перестает если _this на _this select 2

 

 

вот рпт при замене на  _this select 2;

"_humanity:any, _price: any"
Error in expression <_log(format["_humanity:%1, _price: %2", _humanity, _price]);
_array = 
[
["Metis>
  Error position: <_humanity, _price]);
_array = 
[
["Metis>
  Error Undefined variable in expression: _humanity
"_humanity:10027, _price: 2"
"_humanity:any, _price: any"
"_humanity:any"
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
"_humanity:any"
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
"_humanity:any"
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
"_humanity:any"
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
Cannot create non-ai vehicle c_grasstall,

Share this post


Link to post
Share on other sites
  • 0

"_humanity:10025, _price: 2"
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error select: Type Number, expected Array,Config entry
Error in expression <iable ['humanity', 0];
_price         = _this select 2;
diag_log(format["_humanity:%1,>
  Error position: <select 2;
diag_log(format["_humanity:%1,>
  Error Generic error in expression
Cannot create non-ai vehicle c_grasstall,

Share this post


Link to post
Share on other sites
  • 0
26 минут назад, Lucian сказал:

Error in expression <_log(format["_humanity:%1, _price: %2", _humanity, _price]);

не еби нам голову с нерабочим скриптом. или научись диаги вставлять, тут уже по теме все написано. а то что ты кидаешь, совершенно разные скрипты выполняют, ибо такого быть не может.

Share this post


Link to post
Share on other sites
  • 0
12 минуты назад, NoNameUltima сказал:

не еби нам голову с нерабочим скриптом. или научись диаги вставлять, тут уже по теме все написано. а то что ты кидаешь, совершенно разные скрипты выполняют, ибо такого быть не может.

ну базара нет... с this правдо все нормально работает! диаги да я ставить не умею. я тупой!  пойду к пиндосам на форум пореву там точно допрут.

Edited by Lucian (see edit history)

Share this post


Link to post
Share on other sites
  • 0

При написании сообщения на форуме есть кнопочка для вставки кода, чтобы не делать кучу флуда. Выглядит так <>
А по поводу проблемы выше писал, проблему надо искать не в этом скрипте а с того места где этот скрипт вызывается.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Troy1
      Всем привет. Подскжите ну или помогите пожалуйста решить вопрос.
      Вопрос звучит так. На сервере есть трейдер зоны и базы игроков. 
      Если в течение определённого времени, на пример 1 - 2 часа с машиной не кто не взаимодействует и машина не находится в зоне трейдера или на теретории базы, то машина отлетает в гараж или на штраф стоянку.
      На сервере используется TraderPlus.
       
      Есть такие решения у кого?
      За ранние благодарю.
    • By Troy1
      Всем привет. Подскжите ну или помогите пожалуйста решить вопрос.
      Вопрос звучит так. Нужно сделать так, что бы на всей карте был запрет на строительство. 
      Если нужно построить например базу с палатками, то нужно установить верстак или флаг, который установит зону для строительства с радиусом примерно 20-25 метров от центра и желательно что бы зона была квадратной.
      Есть такие решения у кого?
      За ранние благодарю.
    • By BR0wi
      Подскажите где найти людей, которые делаю моды на заказ. К кому вообще обращаться? Или что бы реализовать свои идеи нужно самому "год" сидеть и изучать все механики модинга?
    • By CubeIn
      Приветствую господа, хочу создать новый проект, уникальный, но для этого нужен маппер.
      Я оставлю здесь свой дискрод, напишите в лс, кто готов взяться за крупный проект.
      4me#4542
    • By 6agu
      Поставил
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.