Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.
Страница 1 из 2 1 2 ПоследняяПоследняя
Показано с 1 по 10 из 11

Тема: error 059

  1. #1
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±

    error 059

    Выбивают ошибку, по уроку на форуме (http://pro-pawn.ru/showthread.php?55...yerCommandText).

    PHP код:
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(159) : error 059: function argument may not have a default value (variable "calledbytimer")
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3312) : error 059: function argument may not have a default value (variable "calledbytimer")
    Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


    2 Errors


  2. #2
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±
    Все, решил. Теперь вопрос встал, как сделать чтобы он отображался только тем, кто состоит в организации (Полиция)?

  3. #3
    Аватар для bredvix
    Старичок

    Статус
    Оффлайн
    Регистрация
    01.08.2013
    Адрес
    Нижний Новгород
    Сообщений
    480
    Репутация:
    183 ±
    Код в студию и ид фракции Полиция

  4. #4
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±
    PHP код:
        if(strcmp(cmdtext,"/backup",true)==|| strcmp(cmdtext,"/bk",true)==0)
        {
            if (
    PlayerInfo[playerid][pGroup] == 2) return SendClientMessage(playeridred"Âû íå êîï!");
            if (
    PlayerInfo[playerid][pRequestingBackup]) return SendClientMessage(playeridred"Âû óæå âûçûâàåòå ïîäìîãó!");
            static const 
    fmt_str[]="[Âíèìàíèå]: %s íóæäàåòñÿ â ïîäìîãå, îí îòìå÷åí êðàñíûì ìàðêåðîì íà ðàäàðå.";
            new 
    string[sizeof(fmt_str)-2+MAX_PLAYER_NAME];
            
    GetPlayerName(playeridstringsizeof(string));
            
    format(stringsizeof(string), fmt_strstring);
            
    PlayerInfo[playerid][pRequestingBackup] = 1;
            new 
    GetMaxPlayers();
            do{
                if(
    IsPlayerConnected(--i))
                {
                    if (
    PlayerInfo[playerid][pGroup] == 3)
                    {
                        
    SetPlayerMarkerForPlayer(iplayerid0xFF0000FF);
                        
    SendClientMessage(i0x8D8DFF00string);
                    }
                }
            }while(
    != 0);
            
    SetTimerEx("BackupClear"3*1000false"ii"playerid1);
            return 
    SendClientMessage(playerid0x8D8DFF00"Èñïîëüçóéòå /bkc, ÷òîáû îòìåíèòü âûçîâ ïîäìîãè.");
        }
        if(
    strcmp(cmdtext,"/backupclear",true)==|| strcmp(cmdtext,"/bkc",true)==0)
        {
        
    SendClientMessage(playeridred"Âàø çàïðîñ î ïîäìîãå áûë îòìåíåí.");
        
    PlayerInfo[playerid][pRequestingBackup] = 0;
        } 
    Ид полиции - 2.

  5. #5
    Аватар для bredvix
    Старичок

    Статус
    Оффлайн
    Регистрация
    01.08.2013
    Адрес
    Нижний Новгород
    Сообщений
    480
    Репутация:
    183 ±
    Цитата Сообщение от heralt Посмотреть сообщение
    PHP код:
        if(strcmp(cmdtext,"/backup",true)==|| strcmp(cmdtext,"/bk",true)==0)
        {
            if (
    PlayerInfo[playerid][pGroup] == 2) return SendClientMessage(playeridred"Âû íå êîï!");
            if (
    PlayerInfo[playerid][pRequestingBackup]) return SendClientMessage(playeridred"Âû óæå âûçûâàåòå ïîäìîãó!");
            static const 
    fmt_str[]="[Âíèìàíèå]: %s íóæäàåòñÿ â ïîäìîãå, îí îòìå÷åí êðàñíûì ìàðêåðîì íà ðàäàðå.";
            new 
    string[sizeof(fmt_str)-2+MAX_PLAYER_NAME];
            
    GetPlayerName(playeridstringsizeof(string));
            
    format(stringsizeof(string), fmt_strstring);
            
    PlayerInfo[playerid][pRequestingBackup] = 1;
            new 
    GetMaxPlayers();
            do{
                if(
    IsPlayerConnected(--i))
                {
                    if (
    PlayerInfo[playerid][pGroup] == 3)
                    {
                        
    SetPlayerMarkerForPlayer(iplayerid0xFF0000FF);
                        
    SendClientMessage(i0x8D8DFF00string);
                    }
                }
            }while(
    != 0);
            
    SetTimerEx("BackupClear"3*1000false"ii"playerid1);
            return 
    SendClientMessage(playerid0x8D8DFF00"Èñïîëüçóéòå /bkc, ÷òîáû îòìåíèòü âûçîâ ïîäìîãè.");
        }
        if(
    strcmp(cmdtext,"/backupclear",true)==|| strcmp(cmdtext,"/bkc",true)==0)
        {
        
    SendClientMessage(playeridred"Âàø çàïðîñ î ïîäìîãå áûë îòìåíåí.");
        
    PlayerInfo[playerid][pRequestingBackup] = 0;
        } 
    Ид полиции - 2.
    расскладку измени, а то твои крякозябры не найс читать.

  6. Пользователь сказал cпасибо:
    heralt (28.01.2015)
  7. #6
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±
    PHP код:
    if(strcmp(cmdtext,"/backup",true)==|| strcmp(cmdtext,"/bk",true)==0)
        {
            if (
    PlayerInfo[playerid][pGroup] != 2) return  SendClientMessage(playeridred"Вы не сотрудник Полиции!");
            if (
    PlayerInfo[playerid][pRequestingBackup]) return SendClientMessage(playeridred"Вы уже вызываете подмогу!");
            static const 
    fmt_str[]="[Внимание]: %s нуждается в подмоге, он отмечен красным маркером на радаре.";
            new 
    string[sizeof(fmt_str)-2+MAX_PLAYER_NAME];
            
    GetPlayerName(playeridstringsizeof(string));
            
    format(stringsizeof(string), fmt_strstring);
            
    PlayerInfo[playerid][pRequestingBackup] = 1;
            new 
    GetMaxPlayers();
            do{
                if(
    IsPlayerConnected(--i))
                {
                    if (
    PlayerInfo[playerid][pGroup] == 3)
                    {
                        
    SetPlayerMarkerForPlayer(iplayerid0xFF0000FF);
                        
    SendClientMessage(i0x8D8DFF00string);
                    }
                }
            }while(
    != 0);
            
    SetTimerEx("BackupClear"3*1000false"ii"playerid1);
            return 
    SendClientMessage(playerid0x8D8DFF00"Используйте /bkc, чтобы отменить вызов подмоги.");
        }
        if(
    strcmp(cmdtext,"/backupclear",true)==|| strcmp(cmdtext,"/bkc",true)==0)
        {
        
    SendClientMessage(playeridred"Ваш запрос о подмоге был отменен.");
        
    PlayerInfo[playerid][pRequestingBackup] = 0;
        } 

  8. #7
    Аватар для bredvix
    Старичок

    Статус
    Оффлайн
    Регистрация
    01.08.2013
    Адрес
    Нижний Новгород
    Сообщений
    480
    Репутация:
    183 ±
    PHP код:
           if(strcmp(cmdtext,"/backup",true)==|| strcmp(cmdtext,"/bk",true)==0)
        {
            if (
    PlayerInfo[playerid][pGroup] != 2) return SendClientMessage(playeridred"Вы не сотрудник Полиции!");
            if (
    PlayerInfo[playerid][pRequestingBackup]) return SendClientMessage(playeridred"Вы уже вызываете подмогу!");
            
    //
            
    if (PlayerInfo[playerid][pGroup] == 2)
            {
                static const 
    fmt_str[]="[Внимание]: %s нуждается в подмоге, он отмечен красным маркером на радаре.";
                new 
    string[sizeof(fmt_str)-2+MAX_PLAYER_NAME];
                
    GetPlayerName(playeridstringsizeof(string));
                
    format(stringsizeof(string), fmt_strstring);
            }
            
    //
            
    PlayerInfo[playerid][pRequestingBackup] = 1;
            new 
    GetMaxPlayers();
            do
            {
                if(
    IsPlayerConnected(--i))
                {
                    if (
    PlayerInfo[playerid][pGroup] == 3)
                    {
                        
    SetPlayerMarkerForPlayer(iplayerid0xFF0000FF);
                        
    SendClientMessage(i0x8D8DFF00string);
                    }
                }
            }
            while(
    != 0);
            
    SetTimerEx("BackupClear"3*1000false"ii"playerid1);
            return 
    SendClientMessage(playerid0x8D8DFF00"Используйте /bkc, чтобы отменить вызов подмоги.");
        }
        if(
    strcmp(cmdtext,"/backupclear",true)==|| strcmp(cmdtext,"/bkc",true)==0)
        {
            
    SendClientMessage(playeridred"Ваш запрос о подмоге был отменен.");
            
    PlayerInfo[playerid][pRequestingBackup] = 0;
        } 

  9. #8
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±
    щас посмотрим

    - - - Добавлено - - -

    Короче, сделал команду мегафон, ошибка появилась одна:

    Код команды
    Код HTML:
    if(strcmp(cmdtext, "/mg", true) == 0 || strcmp(cmdtext, "/m", true) == 0)
        {
        if(IsPlayerConnected(playerid))
        {
    	new idx, string[128];
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
        idx++;
        }
        new offset = idx;
        new result[64];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
        result[idx - offset] = cmdtext[idx];
        idx++;
        }
        result[idx - offset] = EOS;
        if(!strlen(result))
        {
        SendClientMessage(playerid, yellow, "ИНФО: (/mg) [megaphone chat]");
        return 1;
        }
        //GetInitials(playerid);
        format(string, sizeof(string),"Офицер %s: %s", sendername, result);
        ProxDetector(100.0, playerid, string,COLOR_TOMATO,COLOR_TOMATO,COLOR_TOMATO,COLOR_TOMATO,COLOR_TOMATO);
        }
        return 1;
        }
    PHP код:
    C:\Users\----------\Desktop\Проект\gamemodes\Heinz-v2.pwn(1128) : error 017undefined symbol "ProxDetector"
    Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


    1 Error

    - - - Добавлено - - -

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

  10. #9
    Аватар для Alexander
    Пользователь

    Статус
    Оффлайн
    Регистрация
    25.12.2013
    Сообщений
    73
    Репутация:
    2 ±
    попоробуй это сунуть в конец мода
    Код HTML:
    stock ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5)
    {
    	new Float:posx, Float:posy, Float:posz;
    	new Float:oldposx, Float:oldposy, Float:oldposz;
    	new Float:tempposx, Float:tempposy, Float:tempposz;
    	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    	foreach(new i:Player)
    	{
    		GetPlayerPos(i, posx, posy, posz);
    		tempposx = (oldposx -posx);
    		tempposy = (oldposy -posy);
    		tempposz = (oldposz -posz);
    		if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, col1, str);
    		else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SendClientMessage(i, col2, str);
    		else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SendClientMessage(i, col3, str);
    		else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SendClientMessage(i, col4, str);
    		else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SendClientMessage(i, col5, str);
    	}
    	return true;
    }

  11. #10
    Аватар для heralt
    Пользователь

    Статус
    Оффлайн
    Регистрация
    21.12.2014
    Сообщений
    164
    Репутация:
    0 ±
    Цитата Сообщение от Alexander Посмотреть сообщение
    попоробуй это сунуть в конец мода
    Код HTML:
    stock ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5)
    {
    	new Float:posx, Float:posy, Float:posz;
    	new Float:oldposx, Float:oldposy, Float:oldposz;
    	new Float:tempposx, Float:tempposy, Float:tempposz;
    	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    	foreach(new i:Player)
    	{
    		GetPlayerPos(i, posx, posy, posz);
    		tempposx = (oldposx -posx);
    		tempposy = (oldposy -posy);
    		tempposz = (oldposz -posz);
    		if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, col1, str);
    		else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SendClientMessage(i, col2, str);
    		else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SendClientMessage(i, col3, str);
    		else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SendClientMessage(i, col4, str);
    		else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SendClientMessage(i, col5, str);
    	}
    	return true;
    }
    PHP код:
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\Pawno\include\sscanf.inc(173) : error 017undefined symbol "foreach"
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\Pawno\include\sscanf.inc(175) : error 017undefined symbol "playerid"
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\Pawno\include\sscanf.inc(178) : error 017undefined symbol "playerid"
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3418) : error 075input line too long (after substitutions)
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3426) : error 017undefined symbol "foreach"
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3426) : error 029invalid expressionassumed zero
    C
    :\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3426) : error 017undefined symbol "Player"
    C:\Users\Áàòÿ âñåÿ Ðóñè\Desktop\Ïðîåêò\gamemodes\Heinz-v2.pwn(3426) : fatal error 107too many error messages on one line

    Compilation aborted
    .Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


    8 Errors

    - - - Добавлено - - -

    Есть у кого инклуд foreach? Нигде найти не могу :c

 

 
Страница 1 из 2 1 2 ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •