Welcome!

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

SignUp Now!

ошибка

Мар
14
1
Пользователь
3.1. Заголовок темы должен отражать основную суть темы.
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
 
Решение
попробуй тогда так

Pawn:
#include <a_samp>

#if defined _ALS_ShowPlayerDialog
    #undef ShowPlayerDialog
#else
    #define _ALS_ShowPlayerDialog
#endif

#define DialogResponse:%0(%1) \
    forward dr_%0(%1); \
    public dr_%0(%1)

#define MAX_DIALOGS 256

static gDialogKeys[MAX_DIALOGS][32];
static gDialogIds[MAX_DIALOGS];
static gDialogCount = 0;

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++)...
Мар
14
1
Пользователь
теперь вот так
2026-03-16_19-08-19.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)
public 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;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;

    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}
main()
{
    print("xxx");
}
 
Осуждён за гениальность или проклят за талант?
Окт
245
665
Активный
Pawn:
#include <a_samp>

#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)

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;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;
    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}

main()
{
    print("xxx");
}

попробуй так
 
Мар
14
1
Пользователь
теперь вот так
Посмотреть вложение 21699
код:
#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)
public 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;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;

    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}
main()
{
    print("xxx");
}
выделенные строки - ошибки
 
Мар
14
1
Пользователь
Pawn:
#include <a_samp>

#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)

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;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;
    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}

main()
{
    print("xxx");
}

попробуй так
2026-03-16_19-12-50.png
 
Осуждён за гениальность или проклят за талант?
Окт
245
665
Активный
Pawn:
#include <a_samp>
#include <YSI\y_hooks>
#include <map>

#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)

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;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    if(!map_has_key(gDialogsId, key))
        return 0;
    map_get_str(gDialogsId, key, dialogKey, size);
    return 1;
}

main()
{
    print("xxx");
}
 
Осуждён за гениальность или проклят за талант?
Окт
245
665
Активный
попробуй тогда так

Pawn:
#include <a_samp>

#if defined _ALS_ShowPlayerDialog
    #undef ShowPlayerDialog
#else
    #define _ALS_ShowPlayerDialog
#endif

#define DialogResponse:%0(%1) \
    forward dr_%0(%1); \
    public dr_%0(%1)

#define MAX_DIALOGS 256

static gDialogKeys[MAX_DIALOGS][32];
static gDialogIds[MAX_DIALOGS];
static gDialogCount = 0;

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++)
    {
        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;
}

#define DialogId(%0) SetDialogId(#%0)

stock SetDialogId(const key[])
{
    new joaat = JOAAT(key);
    if(joaat < 0)
        joaat = -joaat;

    for(new i = 0; i < gDialogCount; i++)
        if(gDialogIds[i] == joaat)
            return joaat;

    if(gDialogCount < MAX_DIALOGS)
    {
        gDialogIds[gDialogCount] = joaat;
        strcat(gDialogKeys[gDialogCount], key, 32);
        gDialogCount++;
    }
    return joaat;
}

stock GetDialogId(key, dialogKey[], size = sizeof(dialogKey))
{
    for(new i = 0; i < gDialogCount; i++)
    {
        if(gDialogIds[i] == key)
        {
            strcat(dialogKey, gDialogKeys[i], size);
            return 1;
        }
    }
    return 0;
}

public OnGameModeInit()
{
    gDialogCount = 0;
    return 1;
}

main()
{
    print("revero the best");
}
 
Сверху