Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ошибка

Мар
5
0
Пользователь
error 013: no entry point (no public functions)
2026-03-16_01-42-22.png
код:
#if defined _ALS_ShowPlayerDialog
    #undef ShowPlayerDialog
#else
    #define _ALS_ShowPlayerDialog
#endif

#define DialogResponse:%0(%1) \
    forward dr_%0(%1); \
    public dr_%0(%1)
#define DialogId(%0) SetDialogId(#%0)
#if defined OnGameModeInit
stock UInt32_LogicalRightShift(value, shift)
{
    if(shift == 0)
        return value & 0xFFFFFFFF;
    else if (shift >= 32)
        return 0;

    new unsignedValue = value & 0xFFFFFFFF,
        shiftedValue = unsignedValue >> shift,
        mask = (1 << (32 - shift)) - 1;

    return shiftedValue & mask;
}

stock JOAAT(const key[])
{
    new length = strlen(key),
        hash;

    for (new i; i < length; i++)
    {
        if(key[i] >= 'Рђ' && key[i] <= 'СЏ')
        {
            printf("joaat hash func only eng! Str: %s | %c", key, key[i]);
            return -1;
        }

        hash += toupper(key[i]);
        hash += (hash << 10);
        hash ^= UInt32_LogicalRightShift(hash, 6);
    }

    hash += (hash << 3);
    hash ^= UInt32_LogicalRightShift(hash, 11);
    hash += (hash << 15);

    return hash & 0xFFFFFFFF;
}

static Map:gDialogsId;

hook OnGameModeInit@10()
{
    gDialogsId = map_new();
    return HOOK_CONTINUE;
}

stock SetDialogId(const key[])
{
    new joaat = JOAAT(key);

    if(joaat < 0)
        joaat = -joaat;

    if(map_has_key(gDialogsId, joaat))
        return joaat;

    map_set_str(gDialogsId, joaat, key);
    return joaat;
}
main()
{
    print("\n----------------------------------");
    )"xxx"(print;
    )"----------------------------------\n"(print;
}
stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;

    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}
#endif
 
Сверху