Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Помогите с include utils

Статус
В этой теме нельзя размещать новые ответы.

EL_Copone

Дебютант
PHP:
C:\Users\Äàíèë\Desktop\pawno\include\utils.inc(83) : warning 203: symbol is never used: "IsNumeric" 
C:\Users\Äàíèë\Desktop\pawno\include\utils.inc(83) : warning 203: symbol is never used: "ReturnUser" 
C:\Users\Äàíèë\Desktop\pawno\include\utils.inc(83) : error 013: no entry point (no public functions)
П
ишет 83 строка а ее даже нет.

Весь код инклюда:


PHP:
#define name 

IsNumeric(const string[]) 
{ 
    for (new i = 0, j = strlen(string); i < j; i++) 
    { 
        if (string[i] > '9' || string[i] < '0') return 0; 
    } 
    return 1; 
} 

ReturnUser(text[], playerid = 0) 
{ 
    new pos = 0; 
    while (text[pos] < 0x21) // Strip out leading spaces 
    { if (text[pos] == 0) return INVALID_PLAYER_ID; pos++; } 
    new userid = INVALID_PLAYER_ID; 
    if (IsNumeric(text[pos])) // Check whole passed string 
    { 
        userid = strval(text[pos]); 
        if (userid >=0 && userid < MAX_PLAYERS) 
        { 
            if(!IsPlayerConnected(userid)) 
            { 
                /*if (playerid != INVALID_PLAYER_ID) 
                { SendClientMessage(playerid, 0xFF0000AA, "User not connected"); }*/ 
                userid = INVALID_PLAYER_ID; 
            } 
            else 
            { 
                return userid; 
            } 
        } 
        /*else 
        { 
            if (playerid != INVALID_PLAYER_ID) 
            { 
                SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID"); 
            } 
            userid = INVALID_PLAYER_ID; 
        } 
        return userid;*/ 
    } 
    new len = strlen(text[pos]); 
    new count = 0; 
    for (new i = 0; i < MAX_PLAYERS; i++) 
    { 
        if (IsPlayerConnected(i)) 
        { 
            GetPlayerName(i, name, sizeof (name)); 
            if (strcmp(name, text[pos], true, len) == 0) 
            { 
                if (len == strlen(name)) // Exact match 
                { 
                    return i; 
                } 
                else // Partial match 
                { 
                    count++; 
                    userid = i; 
                } 
            } 
        } 
    } 
    if (count != 1) 
    { 
        if (playerid != INVALID_PLAYER_ID) 
        { 
            if (count) 
            { 
                SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch"); 
            } 
            else 
            { 
                SendClientMessage(playerid, 0xFF0000AA, "No matching user found"); 
            } 
        } 
        userid = INVALID_PLAYER_ID; 
    } 
    return userid; // INVALID_USER_ID for bad return 
     
} // 82 строка
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу