Warning 215 expression has no effect как исправить

Доброго времени суток, пользователи портала Pawno-Help и просто гости. Все, особенно начинающие скриптеры, сталкиваются с проблемами при компиляции, так называемыми warning'ами и error'ами. Ниже вы найдете все ошибки и варнинги, а так же их решение. ID обычных ошибок: error 001: expected...
error 001: expected token: "%s", but found "%s" - ожидался символ: "%s", но был найден "%s";
error 002: only a single statement (or expression) can follow each "case" - только одно заявление (или выражение) могут следовать за "case";
error 003: declaration of a local variable must appear in a compound block - объявленная локальная переменная должна использоваться в этом же блоке;
error 004: function "%s" is not implemented - функция %s не реализована;
error 005: function may not have arguments - функция не имеет аргументов;
error 006: must be assigned to an array - должен быть присвоен массив;
error 007: operator cannot be redefined - оператор не может быть установлен еще раз;
error 008: must be a constant expression; assumed zero - должно быть постоянным выражением; равным нулю;
error 009: invalid array size (negative or zero) - неверный размер массива (отрицательный или 0);
error 010: invalid function or declaration - неизвестная функция или декларация;
error 011: invalid outside functions - неверно вне функции;
error 012: invalid function call, not a valid address - неверный вызов функции, неверный адрес;
error 013: no entry point (no public functions) - нет точки входа (не public функция);
error 014: invalid statement; not in switch - неверный оператор; не в switch;
error 015: "default" case must be the last case in switch statement - "default" должен быть последним условием в switch;
error 016: multiple defaults in "switch" - несколько "default" в switch;
error 017: undefined symbol "%s" - неизвестный символ "%s";
error 018: initialization data exceeds declared size - данные массива превышают его размер;
error 019: not a label: %s" - не метка "%s";
error 020: invalid symbol name "%s" - неверное имя символа "%s";
error 021: symbol already defined: %s" - символ уже объявлен: "%s";
error 022: must be lvalue (non-constant) - должно быть левосторонним (нет постоянной);
error 023: array assignment must be simple assignment - назначение массива должно быть простым;
error 024: "break" or "continue" is out of context - "break" или "continue" вне контекста;
error 025: function heading differs from prototype - функция заголовка отличается от прототипа;
error 026: no matching "#if..." - не найдено "#if...";
error 027: invalid character constant - недопустимый символ в постоянной;
error 028: invalid subscript (not an array or too many subscripts): "%s" - неверный индекс (это не массив или слишком много индексов): "%s";
error 029: invalid expression, assumed zero - неверное выражение, нет результата;
error 030: compound statement not closed at the end of file - составной оператор не закрыт в конце файла;
error 031: unknown directive - неизвестная директива;
error 032: array index out of bounds (variable "%s") - индекс массива превышен;
error 033: array must be indexed (variable "%s") - массив должен быть проиндексирован;
error 034: argument does not have a default value (argument %d) - аргумент не имеет начального значения (аргумент %d);
error 035: argument type mismatch (argument %d) - несоответствие типа аргумента (аргумент %d);
error 036: empty statement - пустой оператор;
error 037: invalid string (possibly non-terminated string) - неправильная строка;
error 038: extra characters on line - лишние символы в строке;
error 039: constant symbol has no size - символьная константа не имеет размера;
error 040: duplicate "case" label (value %d) - несколько раз объявлен "case" с одним тем же параметром;
error 041: invalid ellipsis, array size is not known - размер массива неизвестен;
error 042: invalid combination of class specifiers - недопустимое сочетание класса;
error 043: character constant exceeds range for packed string - символьная константа превышает размер строки;
error 044: positional parameters must precede all named parameters - позиционные параметры должны предшествовать всем именованным параметрам;
error 045: too many function arguments - слишком много аргументов у функции;
error 046: unknown array size (variable "%s") - неизвестный размер массива;
error 047: array sizes do not match, or destination array is too small - размеры массива конфликтуют, либо целевой массив слишком маленький;
error 048: array dimensions do not match - размеры массива не совпадают;
error 049: invalid line continuation - неправильное продолжение строки;
error 050: invalid range - неверный диапазон;
error 051: invalid subscript, use "[ ]" operators on major dimensions - неправильный индекс, используйте "[]";
error 052: multi-dimensional arrays must be fully initialized - много-размерные массивы должны быть полностью определены;
error 053: exceeding maximum number of dimensions - превышение максимального числа измерений;
error 054: unmatched closing brace - не найдена закрывающаяся скобка;
error 055: start of function body without function header - начало функции без заголовка;
error 056: arrays, local variables and function arguments cannot be public (variable "%s") - массивы, локальные переменные и аргументы функции не могут быть общедоступными;
error 057: unfinished expression before compiler directive - незавершенное выражение для компилятора;
error 058: duplicate argument; same argument is passed twice - дублирование аргумента; Аргумент передается несколько раз;
error 059: function argument may not have a default value (variable "%s") - аргумент не может иметь значение по-умолчанию;
error 060: multiple "#else" directives between "#if ... #endif" - Несколько "#else" между "#if ... #endif" - несколько "#else" между "#if и #endif";
error 061: "#elseif" directive follows an "#else" directive - "#else" перед "#elseif";
error 062: number of operands does not fit the operator - количество операндов не соответствует оператору;
error 063: function result tag of operator "%s" must be "%s" - Результат функции %s должен быть %s;
error 064: cannot change predefined operators - невозможно изменить уже определенные операторы;
error 065: function argument may only have a single tag (argument %d) - в этой функции может быть только один аргумент;
error 066: function argument may not be a reference argument or an array (argument "%s") - аргумент функции не может быть ссылкой или массивом;
error 067: variable cannot be both a reference and an array (variable "%s") - Переменная не может быть как массив или ссылка;
error 068: invalid rational number precision in #pragma - неверное число в #pragma;
error 069: rational number format already defined - формат рационального числа уже определен;
error 070: rational number support was not enabled - рациональное число не поддерживается;
error 071: user-defined operator must be declared before use (function "%s") - объявленный оператор должен быть перед использованием;
error 072: "sizeof" operator is invalid on "function" symbols - оператор "sizeof" не может быть использован для символов функции;
error 073: function argument must be an array (argument "%s") - аргумент %s должен быть массивом;
error 074: #define %s must start with an alphabetic character - #define должен начинаться с буквы;
error 075: input line too long (after substitutions - введенная строка слишком длинная;
error 076: syntax *error in the expression, or invalid function call - неправильный синтаксис или неправильный вызов функции;
error 077: malformed UTF-8 encoding, or corrupted file: %s - плохая кодировка UTF-8 или плохой файл: %s;
error 078: function uses both "return" and "return <value>" - функция использует "return" и "return <значение>";
error 079: inconsistent return types (array & non-array) - несовместимость типов возвращенных результатов;
error 080: unknown symbol, or not a constant symbol (symbol "%s") - неизвестный или непостоянный символ: %s;
error 081: cannot take a tag as a default value for an indexed array parameter (symbol "%s") - не может принимать тег в качестве значения по умолчанию для параметра индексированного массива;
error 082: user-defined operators and native functions may not have states - созданные функции или операторы не имеют состояния;
error 083: a function may only belong to a single automaton (symbol "%s") - функция может принадлежать только к одной автоматизации;
error 084: state conflict: one of the states is already assigned to another implementation (symbol "%s") - конфликт состояния: одно из состояний уже назначено на другую реализацию;
error 085: no states are defined for function "%s" - нет состояний, определенных для функции "%s";
error 086: unknown automaton "%s" - неизвестная автоматизация "%s";
error 087: unknown state "%s" for automaton "%s" - неизвестное состояние "%s" в автоматизации "%s";
error 088: number of arguments does not match definition - количество аргументов не совпадает с объявленными в функции;


#1

Пользователь офлайн
 

Отправлено 28 мая 2019 — 12:17

  • Новичок

C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : warning 215: expression has no effect
C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : error 001: expected token: «;», but found «[«
C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : error 029: invalid expression, assumed zero
C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : warning 215: expression has no effect
C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : error 001: expected token: «;», but found «]»
C:Users???????Desktop????? ????? (2)gamemodesUntitled.pwn(163) : fatal error 107: too many error messages on one line
КОД:
(СТРОКА 163) — PlayerInfo[playerid][pAdmin] = 0;

0



#2

Отправлено 28 мая 2019 — 12:27

  • Прохожий

Покажи полностью код, в котором находиться эта строка!

0



#3

Отправлено 28 мая 2019 — 12:28

  • Новичок

Просмотр сообщенияTaHKucT (28 мая 2019 — 12:27) писал:

Покажи полностью код, в котором находиться эта строка!

public OnPlayerConnect(playerid)
{
DBP_Exit(playerid);
new plname[MAX_PLAYER_NAME];
new string[50];
GetPlayerName(playerid,plname,100);
format(string,sizeof(string),»%s {ffffff}зашел на сервер {808080}(ID:%d)»,plname,playerid);
SendClientMessageToAll(0x00FF00,string);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
//Reset start
PlayerInfo[playerid][pAdmin] = 0;
//End
new playername[MAX_PLAYER_NAME];// Массив для имени игрока
new string[128];// Путь до папки с именем игрока
GetPlayerName(playerid,playername,sizeof(playername));// Узнаём имя игрока
format(string,sizeof(string),»players/%s.ini», playername);// Путь к файлу с аккаунтом
if(fexist(string))// Проверка на файл, если он есть то выполняется следующее действие.
{
PAccount[playerid] = 1;// Аккаунт есть
}
else// Если файла с именем нет, то выполняется это действие.
{
PAccount[playerid] = 0;// Аккаунта нет
}
return 1;

}

0



#4

Отправлено 28 мая 2019 — 12:32

  • Прохожий
if(PlayerInfo[playerid][pAdmin] == 0) return 1;

Замени на свою!

0



#5

Отправлено 28 мая 2019 — 12:36

  • Новичок

Просмотр сообщенияTaHKucT (28 мая 2019 — 12:32) писал:

if(PlayerInfo[playerid][pAdmin] == 0) return 1;

Замени на свою!

Не понял..

0



#6

Отправлено 28 мая 2019 — 12:53

  • Прохожий

У тебя в коде написано

PlayerInfo[playerid][pAdmin] = 0;

Замени на

if(PlayerInfo[playerid][pAdmin] == 0) return 1;

Что не понятного то?

0



#7

Отправлено 28 мая 2019 — 13:03

  • Новичок

Просмотр сообщенияTaHKucT (28 мая 2019 — 12:53) писал:

У тебя в коде написано

PlayerInfo[playerid][pAdmin] = 0;

Замени на

if(PlayerInfo[playerid][pAdmin] == 0) return 1;

Что не понятного то?

Не помогает, теже ошибки выдает..

0



#8

Отправлено 28 мая 2019 — 13:09

  • Новичок

C:UsersАлексейDesktopНовая папка (2)gamemodesUntitled.pwn(160) : error 001: expected token: «)», but found «[«
C:UsersАлексейDesktopНовая папка (2)gamemodesUntitled.pwn(160) : error 029: invalid expression, assumed zero
C:UsersАлексейDesktopНовая папка (2)gamemodesUntitled.pwn(160) : warning 215: expression has no effect
C:UsersАлексейDesktopНовая папка (2)gamemodesUntitled.pwn(160) : error 001: expected token: «;», but found «]»
C:UsersАлексейDesktopНовая папка (2)gamemodesUntitled.pwn(160) : fatal error 107: too many error messages on one line

Сообщение отредактировал Vovanser: 28 мая 2019 — 13:12

0



#9

Отправлено 28 мая 2019 — 13:14

  • Профессионал

Что за бред вы ему пишите ?? Чё смысл зачем там эта проверка???

И что это за код у меня глаза кровоточат
Бессмысленный , без проверок пароля по 2 раза узнаем ник

0



#10

Отправлено 28 мая 2019 — 13:28

  • Новичок

Просмотр сообщения_54REGION_ (28 мая 2019 — 13:14) писал:

Что за бред вы ему пишите ?? Чё смысл зачем там эта проверка???

И что это за код у меня глаза кровоточат
Бессмысленный , без проверок пароля по 2 раза узнаем ник

http://pawn-wiki.ru/…acija-na-mxini/

0


  • ← Предыдущая тема
  • Вопросы по скриптингу
  • Следующая тема →

  • Вы не можете создать новую тему
  • Тема закрыта


1 человек читают эту тему
0 пользователей, 1 гостей, 0 скрытых пользователей

  • 0


fulword

Вопросы

Спойлер

C:UsersDesktopgamemodesnew.pwn(4324) : warning 215: expression has no effect
C:UsersDesktopgamemodesnew.pwn(4325) : warning 215: expression has no effect

Спойлер

    GruzRabota[playerid] == 0;
    GruzSkin[playerid] == 0;

Скрин кода с ошибкой

И ещё одна ошибка

Спойлер

C:UsersDesktopgamemodesnew.pwn(6713) : warning 215: expression has no effect
C:UsersDesktopgamemodesnew.pwn(6714) : warning 202: number of arguments does not match definition
C:UsersDesktopgamemodesnew.pwn(6722) : warning 202: number of arguments does not match definition
C:UsersDesktopgamemodesnew.pwn(6723) : warning 215: expression has no effect

Спойлер

    if(GruzRabota[playerid] == 1)
    {
        SCM(playerid, 0xFFFFFFFF, «Вы успешно взяли мешок, отправляйтесь на склад!»);
        DisablePlayerCheckpoint(playerid);
        GruzRabota[playerid] == 2;
        SetPlayerCheckpoint(playerid, 2538.8340,-2105.9941,22.1602);// x, y, z — свои координаты
        return true;
    }
    if(GruzRabota[playerid] == 2)
    {
        new money = random(150);
        GivePlayerMoney(playerid, money);
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, 2557.1182,-2119.3181,21.9406);// x, y, z — свои координаты
        GruzRabota[playerid] == 1;
        SCM(playerid, 0xFFFFFFFF, «Вы успешно принесли мешок, теперь отправляйтесь за другим мешком.!»);
        return true;
    }

Скрин кода где ошибка

Заметка от

DEST
, создано 3 ноября, 2017

Не нужно писать слово «помогите» в заголовках. Лучше указывайте ид ошибок / варнингов.

Поделиться сообщением


Ссылка на сообщение

Лучший ответ

Опубликовал

Гость stibs

,Опубликовано 3 ноября, 2017

@fulword в конце, перед закрывающейся скобкой нужно указывать радиус чекпоинта. Укажите 5.0. 

9 ответов на этот вопрос

  • Сортировать по голосам
  • Сортировать по дате
  • 0

@fulword в конце, перед закрывающейся скобкой нужно указывать радиус чекпоинта. Укажите 5.0

Поделиться сообщением


Ссылка на сообщение

  • 0

@fulword Замените: 

GruzRabota[playerid] = 0;
GruzSkin[playerid] = 0;

И второй код замените: 
 

Спойлер

  if(GruzRabota[playerid] == 1)
    {
        SCM(playerid, 0xFFFFFFFF, "Вы успешно взяли мешок, отправляйтесь на склад!");
        DisablePlayerCheckpoint(playerid);
        GruzRabota[playerid] = 2;
        SetPlayerCheckpoint(playerid, 2538.8340,-2105.9941,22.1602);// x, y, z - свои координаты
        return true;
    }
    if(GruzRabota[playerid] == 2)
    {
        new money = random(150);
        GivePlayerMoney(playerid, money);
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, 2557.1182,-2119.3181,21.9406);// x, y, z - свои координаты
        GruzRabota[playerid] = 1;
        SCM(playerid, 0xFFFFFFFF, "Вы успешно принесли мешок, теперь отправляйтесь за другим мешком.!");
        return true;
    }

Поделиться сообщением


Ссылка на сообщение

  • 0

DEST вот ещё ошибка она относится к этой же системе

Спойлер

C:UsersDesktopgamemodesnew.pwn(8057) : error 017: undefined symbol «JobGruzchik»
C:UsersDesktopgamemodesnew.pwn(8061) : error 017: undefined symbol «JobGruzchik»
C:UsersDesktopgamemodesnew.pwn(11261) : error 017: undefined symbol «JobGruzchik»

Спойлер

(8057) SPD(playerid, JobGruzchik, DSM, «{FFFFFF}Устройство на работу», «Вы действительно хотите устроиться на работу грузчика», «Согласен», «Отмена»);

(8061) SPD(playerid, JobGruzchik, DSM, «{FFFFFF}Увольнение с работы», «Вы действительно хотите уволиться с работы грузчика», «Да», «Нет»);

(11261) case JobGruzchik:

Поделиться сообщением


Ссылка на сообщение

  • 0

@fulword вместо JobGruzchik вставьте 2576.

Поделиться сообщением


Ссылка на сообщение

  • 0

stibs  Теперь такую ошибку показывает 

Спойлер

if(GruzRabota[playerid] = 0)

Спойлер

C:UsersDesktopgamemodesnew.pwn(11264) : warning 211: possibly unintended assignment

Отредактировано 3 ноября, 2017 пользователем fulword

Поделиться сообщением


Ссылка на сообщение

  • 0

@fulword там должно быть два знака равно, а не один. 

Поделиться сообщением


Ссылка на сообщение

  • 0

stibs Вот ещё ошибки показывает хотя тут вроде как всё правильно если только координаты неправильно стоят

Спойлер

C:UsersDesktopgamemodesnew.pwn(6714) : warning 202: number of arguments does not match definition
C:UsersDesktopgamemodesnew.pwn(6722) : warning 202: number of arguments does not match definition

Спойлер

(6714) SetPlayerCheckpoint(playerid,2538.8340,-2105.9941,22.1602);

(6722) SetPlayerCheckpoint(playerid,2557.1182,-2119.3181,21.9406);

Отредактировано 3 ноября, 2017 пользователем fulword

Поделиться сообщением


Ссылка на сообщение

  • 0

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

Поделиться сообщением


Ссылка на сообщение

  • 0

@fulword форум создан не для тебя одного, поэтому никакие темы не удаляются. 

Поделиться сообщением


Ссылка на сообщение


Гость

Эта тема закрыта для публикации ответов.

  • Последние посетители

      0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

  • Похожий контент


    • OnMyTem4ick

      От

      OnMyTem4ick

      Продам CEF HUD для вашего проекта сампкрмп
      Создатель hud’a
      vk : vk.com/onmytem4ick 
      телеграмм : https://t.me/OnMyTem4ick
      За покупкой обращаться только к нему!

      Цена : 500 руб.
      Если нужна установка от меня, то + 150 руб.
      Оплата : Сбербанк Qiwi

       

       

       

      Худ оптимизирован под все разрешения

      Худ не багается, и никогда не выключается сам по себе

      Полностью рабочий, и готов служить на вашем сервере верой, и правдой

      Также за доп. плату могу подредактировать худ под ваш вкус


    • maximkakvolkov

      От

      maximkakvolkov

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

Author

Message

Senior Member

Old

10-13-2012

, 11:58

 

Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#1


Hello i’ve got a small problem with plugin.

Code:

public Action:mech_die(client)
{
 PrintToChatAll("Mechanical Robot Level %d has been defeated!", mech_level);
 mech_level + 5
}

I want to do something like that: When each time player defeat player who is mechanical robot. mech_level variable that standard value is 1 would increase by 5 each time player defeat mech. Higher level = more hp etc. But when i’m compiling i’m getting this error :
warning 215 :Expression has no effect

I wish somebody could tell me what i’m doing wrong


Last edited by jacek2144; 10-13-2012 at 12:14.

jacek2144 is offline

Good Little Panda

thetwistedpanda's Avatar

Old

10-13-2012

, 12:32

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#2


mech_level += 5

__________________

thetwistedpanda is offline

Senior Member

Join Date: Aug 2009

Location: Israel

Old

10-13-2012

, 12:36

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#3


Quote:

Originally Posted by thetwistedpanda
View Post

mech_level += 5

same as
mech_level = mech_level + 5

felt like its important to mention it

miniman is offline

AlliedModders Donor

Join Date: Dec 2011

Location: Israel

Old

10-17-2012

, 16:41

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#5


Quote:

Originally Posted by miniman
View Post

same as
mech_level = mech_level + 5

felt like its important to mention it

It’s the same effect you metumtam.

__________________

retired

shavit is offline

AlliedModders Donor

Powerlord's Avatar

Join Date: Jun 2008

Location: Seduce Me!

Old

10-18-2012

, 09:42

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#6


Quote:

Originally Posted by shavit
View Post

It’s the same effect you metumtam.

…which is the very first thing he said, yes. He was explaining what += did in case jacek2144 didn’t know.

__________________

Not currently working on SourceMod plugin development.

Powerlord is offline

SourceMod Donor

Old

10-19-2012

, 00:45

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#7


Quote:

Originally Posted by shavit
View Post

It’s the same effect you metumtam.

I have a set of personal checks before posting something; I think you could actually utilize this for a better forum experience.
When posting something, make sure that:

  • What you’re saying is helpful
  • What you’re saying hasn’t been said before
  • What you’re saying is relevant
  • And finally… what you’re saying is approved by javalia

Now the post that I’m currently making doesn’t pass all of the above, but I felt like I should make the exception this time, since I’ve seen a lot of posts by you that could be revised if you understand these self-check assessment strategy.

__________________

Need help? PM me or add me on Steam.
My Steam

Quote:

Originally Posted by Rp.KryptoNite
View Post

For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING

minimoney1 is offline

Member

SkydiveX's Avatar

Join Date: Jul 2012

Location: England

Old

10-20-2012

, 12:13

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#8


Quote:

Originally Posted by minimoney1
View Post

I have a set of personal checks before posting something; I think you could actually utilize this for a better forum experience.
When posting something, make sure that:

  • What you’re saying is helpful
  • What you’re saying hasn’t been said before
  • What you’re saying is relevant
  • And finally… what you’re saying is approved by javalia

Now the post that I’m currently making doesn’t pass all of the above, but I felt like I should make the exception this time, since I’ve seen a lot of posts by you that could be revised if you understand these self-check assessment strategy.

Oh god…. We must all fear the great one.

Also Saying That There Is
*=
+=
/=
-=
in the syntax, good luck and have fun coding. D:.

__________________


_____________________________________________ _______________
Pastafarian and proud!

SkydiveX is offline

AlliedModders Donor

Join Date: Dec 2011

Location: Israel

Old

10-21-2012

, 03:14

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#9


Quote:

Originally Posted by SkydiveX
View Post

Oh god…. We must all fear the great one.

Also Saying That There Is
*=
+=
/=
-=
in the syntax, good luck and have fun coding. D:.

Whaz about ^=? I guess that there’s %= but I’m unsure.

__________________

retired

shavit is offline

AlliedModders Donor

Powerlord's Avatar

Join Date: Jun 2008

Location: Seduce Me!

Old

10-21-2012

, 03:19

 

Re: Sourcemod plugin compiling warning 215 :Expression has no effect

Reply With Quote

#10


Quote:

Originally Posted by shavit
View Post

Whaz about ^=? I guess that there’s %= but I’m unsure.

^= isn’t a math operator, just like &= and |= aren’t. All 3 are bit-wise operators (^ is xor, & is and, | is or)

Any use of ^= is almost certainly wrong… you want &= ^ to remove specific flags.

__________________

Not currently working on SourceMod plugin development.


Last edited by Powerlord; 10-21-2012 at 03:22.

Powerlord is offline

Список часто встречаемых ошибок в pawno

Данная тема содержет наиболее распространенные ошибки и предупреждения в pawno при создании скриптов sa-mp
Когда компилятор находит ошибку в файле, то выводится сообщение, в таком порядке:

  • Имя файла
  • номер строки компилятора были обнаружены ошибки в скобках, непосредственно за именем
  • класс error (ошибка, фатальная ошибка или предупреждение)
  • номер ошибки
  • описание ошибки

Например:

hello.pwn(3) : error 001: expected token: ";", but found "{"

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

Категории ошибок

Ошибки разделяются на три класса:

Ошибки (errors)

  • Описание ситуации когда компилятор не может скомпилировать код
  • Ошибки номеруются от 1 до 99

Критические ошибки (Fatal errors)

  • Критические ошибки и описание, от которых компилятор не может восстановиться.
  • Парсинг прерывается (нет отклика программы).
  • Критические ошибки номеруются от 100 до 199.

Предупреждения ( Warings )

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

Распространенные ошибки

001: expected token (ожидаемый знак)
Обязательный знак отсутствует

Пример:

error 001: expected token: ";", but found "return"
main()
{
    print("test") // тут должна быть точка с запятой ";"
    return 1;
}

002: only a single statement (or expression) can follow each “case” (только одно выражение может быть в одной строке с «case»
В каждом case оператора switch без фигурных скобок может содержаться только один оператор если больше нужно ставить скобки.
Пример:

error 002: only a single statement (or expression) can follow each "case"

main()
{
    switch(x)
    {
        case 0: print("hello"); print("hello");
    }
    return 1;
}

Так же могут быть еще и предупреждения и дополнительные ошибки:

error 002: only a single statement (or expression) can follow each "case"
warning 215: expression has no effect
error 010: invalid function or declaration

Вот так это можно исправить:

main()
{
    switch(x)
    {
        case 0:
        {
            print("hello");
            print("hello");
        }
    }
    return 1;
}

004: function «x» is not implemented (Функция «x» не используется
Часто бывает что в функции выше пропущена скобка.

025: function heading differs from prototype
Это проиходит когда в функции не совпадают аргументы.

К примеру:

forward MyFunction(playerid);
public MyFunction(player, vehicleid);

Исправляем:

forward MyFunction(playerid, vehicleid);
public MyFunction(playerid, vehicleid);

035: argument type mismatch (argument x) (не совпадение типов аргумента(ов)
К примеру когда в место playerid — integer аргумента стоит «playerid» — string или 0.5 — float

Пример:

error 035: argument type mismatch (argument 1)

Kick("playerid"); // Как видите в место целого числа (integer) стоит строка

Исправляем:

Kick(playerid);

046: unknown array size (variable x)
Не указан размер массива.

Пример:

new string[];
string = "pawno";

Исправляем:

new string[6];
string = "pawno";

047: array sizes do not match, or destination array is too small
Размер массива мал или не совпадает.

  • Многомерные массивы должны иметь одинаковый размер
  • Одномерные массив к которому присваивают(правый должен иметь больше размер чем левый.
new destination[8];
new msg[] = "Hello World!";
 
destination = msg;

В приведенном выше коде размер строки «Hello world!» ровна 12 байт а массив к которому присваиваем имеет размер 8 байт из этого и складывается ошибка.
Если увеличить размер массива destination до 13 байт то ошибка исправится.

new destination[13];
new msg[] = "Hello World!";
destination = msg;

055: start of function body without function header
Начало тела функции без функции заголовка.

Критические ошибки (FATAL ERRORS)

100: cannot read from file: "<file>"

Компилятор не может найти или прочитать указанный файл, убедитесь что он находится по адресу (<папка с сервером>pawnoinclude).
Пример:

#include <a_sam>

Исправляем:

#include <a_samp>

Совет
Изображение Не нужно открывать ваш код дважды, не нужно тыкать несколько раз на файл. Откройте сначала редактор, потом ваш проект.

Предупреждения( Warnings )

202: number of arguments does not match definition
Описание ошибки довольно понятное, это значит что вы используете слишком мало или слишком много аргументов в функции, обычно это признак того что функция используется не правильно, обратитесь к документации.
Функция GetPlayerHealth согласно официальному источнику wiki.sa-mp.com имеет два аргумента playerid и Float:health ссылка

Пример:

GetPlayerHealth(playerid);

Исправляем:

new Float:health;
GetPlayerHealth(playerid, health);

203: symbol is never used: «symbol»
Вы создали переменную или функцию и она ни где не используется тогда ищите в окне компилятора это предупреждение, это не как не влияет на код и не угражает ему, так что если вы удалите переменную или функцию которая не используется, то вы сэкономите память.

Пример:

stock SomeFunction()
{
    // Blah
}

204: symbol is assigned a value that is never used: «symbol»
Это предупреждение аналогично к предыдущему, разница в том что к переменной что то присвоено и оно не как не используется, это безопасно :)

209: function should return a value
Функция ничего не возвращает, вы создали её:

SomeFunction()
{
     // Blah
}

Решили её присвоить к чему нибудь к примеру:

new result = SomeFunction(); // ожидает 1

Вот так исправить

SomeFunction()
{
     // Blah
     return 1;
}

211: possibly unintended assignment
Если вы введете оператор присваивания в условии и оно не будет в круглых скобках то будет предупреждение

if(vehicle = GetPlayerVehicleID(playerid)) // ошибка
if(vehicle == GetPlayerVehicleID(playerid)) // все норм
if((vehicle = GetPlayerVehicleID(playerid))) // все норм, так значение функции присвоится к переменной потом выражение вычесляется { то есть это как if(IsPlayerConnected(playerid)}

213: tag mismatch ( несовпадение тегов)
Это происходит когда:

  • Тип переменной указан не верно или не имеет его
  • Выражения по обе стороны бинарного оператора имеют разные теги
  • В пременную возвращен не верный тип переменной или не имеющий его.
  • Индексирование массива, который требует тегами индекс без тега или неправильное имя тега

Часто это бывает на 3d текстах или тексдравах Text3D, Text

Не правильно:

new health;
GetPlayerHealth(playerid, health);

Правильно:

new Float:health;
GetPlayerHealth(playerid, health);

217: loose indentation
Компилятор выдаст ошибку если не соблюдены отступы.

Правильно:

if(condition)
{
    action();
    result();
}

Не правильно:

if(condition)
{
    action();
  result();
}

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

219: local variable «foo» shadows a variable at a preceding level
Локальная переменная в тени глобальной то есть над локальной переменной создана точно такая же глобальная. В практике программирования префиксом глобальной переменной является «g» в начале переменной к примеру

new gPlayerMoney

любыми способами избегайте их.

К примеру:

new team[MAX_PLAYERS]; // объявляем глобальную переменную
 
function(playerid)
{
    new team[MAX_PLAYERS]; // создаем еще одну, и получаем статью 219 кодекса ошибок :D
    team[playerid] = random(5); 
}

Решение:
Просто переименуйте локальную переменную team.

225: unreachable code ( недоступный код )
Это происходит тогда когда вы пишите какой нибудь код после return, после return’а код не выполняется и он считается бесполезным

Пример:

#include <zcmd.inc>
CMD:jetpack(playerid, params[])
{
	#pragma unused params
	if(IsPlayerAdmin(playerid))
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
	    return 1; // завершаем процесс
	}
	else
	{
	    SendClientMessage(playerid, -1, "Вы не администратор");
	    return 1; // завершаем процесс
	}
	SendClientMessage(playerid, -1, "Вы ввели команду /jp"); // Этот код не доступен он не будет выполнятся.
}

Решение:

CMD:jetpack(playerid, params[])
{
	#pragma unused params
	if(IsPlayerAdmin(playerid))
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
	}
	else
	{
	    SendClientMessage(playerid, -1, "Вы не администратор");
	}
	SendClientMessage(playerid, -1, "Вы ввели команду /jp"); // этот код запустится
	return 1; // завершаем процесс
}

235: public function lacks forward declaration (symbol «symbol»)
Отсутствует forward.

Не правильно:

public MyFunction()
{

}

Правильно:

forward MyFunction();
 
public MyFunction()
{

}

Надеюсь эта статья поможет вам в языке программирования, желаю вам не повторять ошибок дважды и что бы ваш код был быстрым, надежным!
Оставляйте ваши отзывы, ставьте плюсы, пишите недостатки ошибки, недостатки статьи или их недочеты. Удачи в мире PAWNO!

From SA-MP Wiki

Jump to: navigation, search

Contents

  • 1 General Pawn Error List
  • 2 Error categories
    • 2.1 Errors
    • 2.2 Fatal errors
    • 2.3 Warnings
  • 3 Common Errors
    • 3.1 001: expected token
    • 3.2 002: only a single statement (or expression) can follow each “case”
    • 3.3 004: function «x» is not implemented
    • 3.4 025: function heading differs from prototype
    • 3.5 035: argument type mismatch (argument x)
    • 3.6 036: empty statement
    • 3.7 046: unknown array size (variable x)
    • 3.8 047: array sizes do not match, or destination array is too small
    • 3.9 055: start of function body without function header
  • 4 Common Fatal Errors
    • 4.1 100: cannot read from file: «<file>»
  • 5 Common Warnings
    • 5.1 202: number of arguments does not match definition
    • 5.2 203: symbol is never used: «symbol»
    • 5.3 204: symbol is assigned a value that is never used: «symbol»
    • 5.4 209: function should return a value
    • 5.5 211: possibly unintended assignment
    • 5.6 213: tag mismatch
    • 5.7 217: loose indentation
    • 5.8 219: local variable «foo» shadows a variable at a preceding level
    • 5.9 225: unreachable code
    • 5.10 235: public function lacks forward declaration (symbol «symbol»)
  • 6 External Links

General Pawn Error List

This pages contains the most common errors and warnings produced by the pawn compiler when creating SA:MP scripts.

When the compiler finds an error in a file, it outputs a message giving, in this order:

  • the name of the file
  • the line number were the compiler detected the error between parentheses, directly behind the filename
  • the error class (error, fatal error or warning)
  • an error number
  • a descriptive error message

For example:

hello.pwn(3) : error 001: expected token: ";", but found "{"

Note: The error may be on the line ABOVE the line that is shown, since the compiler cannot always establish an error before having analyzed the complete expression.

Error categories

Errors are separated into three classes:

Errors

  • Describe situations where the compiler is unable to generate appropriate code.
  • Errors messages are numbered from 1 to 99.

Fatal errors

  • Fatal errors describe errors from which the compiler cannot recover.
  • Parsing is aborted.
  • Fatal error messages are numbered from 100 to 199.

Warnings

  • Warnings are displayed for unintended compiler assumptions and common mistakes.
  • Warning messages are numbered from 200 to 299.

Common Errors

001: expected token

A required token is missing.

Example:

error 001: expected token: ";", but found "return"
main()
{
    print("test") // This line is missing a semi-colon. That is the token it is expecting.
    return 1; // The error states that it found "return", this is this line it is referring to,
    // as it is after the point at which the missing token (in this case the semi-colon) should be.
}

002: only a single statement (or expression) can follow each “case”

Every case in a switch statement can hold exactly one statement.
To put multiple statements in a case, enclose these statements
between braces (which creates a compound statement).

Example:

error 002: only a single statement (or expression) can follow each "case"
main()
{
    switch(x)
    {
        case 0: print("hello"); print("hello");
    }
    return 1;
}

The above code also produces other warnings/errors:

error 002: only a single statement (or expression) can follow each "case"
warning 215: expression has no effect
error 010: invalid function or declaration

Fixed:

main()
{
    switch(x)
    {
        case 0:
        {
            print("hello");
            print("hello");
        }
    }
    return 1;
}

004: function «x» is not implemented

Most often caused by a missing brace in the function above.

025: function heading differs from prototype

This usually happen when new sa-mp version comes with new addition of argument to a function, like OnPlayerGiveDamage from 0.3x to 0.3z. The scripter must add «bodypart» argument to OnPlayerGiveDamage callback on their script.

Caused by either the number of arguments or the argument name is different.

Example:

forward MyFunction(playerid);
 
public MyFunction(player, vehicleid)

Fixed:

forward MyFunction(playerid, vehicleid);
 
public MyFunction(playerid, vehicleid)

035: argument type mismatch (argument x)

An argument passed to a function is of the wrong ‘type’.
For example, passing a string where you should be passing an integer.

Example:

error 035: argument type mismatch (argument 1)
Kick("playerid"); // We are passing a STRING, we should be passing an INTEGER

Fixed:

Kick(playerid);

036: empty statement

Caused by a rogue semicolon (;), usually inadvertently placed behind an if-statement.

046: unknown array size (variable x)

For array assignment, the size of both arrays must be explicitly defined, also if they are passed as function arguments.

Example:

new string[];
string = "hello";

Fixed:

new string[6];
string = "hello";

047: array sizes do not match, or destination array is too small

For array assignment, the arrays on the left and the right side of the
assignment operator must have the same number of dimensions.
In addition:

  • for multi-dimensional arrays, both arrays must have the same size;
  • for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side.
new destination[8];
new msg[] = "Hello World!";
 
destination = msg;

In the above code, we try to fit 12 characters in an array that can only support 8. By increasing the array size of the destination, we can solve this. Note that a string also requires a null terminator so the total length of «Hello World!» plus the null terminator is, in fact, 13.

new destination[13];
new msg[] = "Hello World!";
 
destination = msg;

055: start of function body without function header

This error usually indicates an erroneously placed semicolon at the end of the function header.

Common Fatal Errors

100: cannot read from file: «<file>»

The compiler cannot find, or read from, the specified file. Make sure that the file you are trying to include is in the proper directory (default: <server directory>pawnoinclude).

Tip

Image:Light_bulb_icon.png

Multiple copies of pawno can lead to this problem. If this is the case, don’t double click on a .pwn file to open it. Open your editor first, then open the file through the editor.

Common Warnings

202: number of arguments does not match definition

The description of this warning is pretty self-explanatory. You’ve passed either too few or too many parameters to a function. This is usually an indication that the function is used incorrectly. Refer to the documentation to figure out the correct usage of the function.

This usually happen on GetPlayerHealth function with PAWNO function auto completion as it confuses with the NPC GetPlayerHealth function that only has ‘playerid’ argument.

Example:

GetPlayerHealth(playerid);

Fixed:

new Float:health;
GetPlayerHealth(playerid, health);

203: symbol is never used: «symbol»

You have created a variable or a function, but you’re not using it. Delete the variable or function if you don’t intend to use it. This warning is relatively safe to ignore.

The stock keyword will prevent this warning from being shown, as variables/functions with the stock keyword are not compiled unless they are used.

stock SomeFunction()
{
    // Blah
}
 
// There will be no warning if this function is never used

204: symbol is assigned a value that is never used: «symbol»

Similar to the previous warning. You created a variable and assigned it a value, but you’re not using that value anywhere. Use the variable, or delete it. This warning, too, is relatively safe to ignore.

209: function should return a value

You have created a function without a return value

SomeFunction()
{
     // Blah
}

but you used it to assign on variable or function argument,

new result = SomeFunction(); // expected value = 1

Fixed:

SomeFunction()
{
     // Blah
     return 1;
}

211: possibly unintended assignment

The assignment operator (=) was found in an if-statement, instead of the equality operator (==). If the assignment is intended, the expression must be wrapped in parentheses. Example:

if(vehicle = GetPlayerVehicleID(playerid)) // warning
if(vehicle == GetPlayerVehicleID(playerid)) // no warning
if((vehicle = GetPlayerVehicleID(playerid))) // no warning; the value returned by the function will be assigned to the variable and the expression is then evaluated.

213: tag mismatch

A tag mismatch occurs when:

  • Assigning to a tagged variable a value that is untagged or that has a different tag
  • The expressions on either side of a binary operator have different tags
  • In a function call, passing an argument that is untagged or that has a different tag than what the function argument was defined with
  • Indexing an array which requires a tagged index with no tag or a wrong tag name

Usually happen on a new variable created with missing tag on the required function such as Float:, Text3D:, Text:, etc. Example,

Bad:

new health;
GetPlayerHealth(playerid, health);

Good:

new Float:health;
GetPlayerHealth(playerid, health);

217: loose indentation

The compiler will issue this warning if the code indentation is ‘loose’, example:

Good:

if(condition)
{
    action();
    result();
}

Bad:

if(condition)
{
    action();
  result();
}

Indentation means to push (indent) text along from the left of the page (by pressing the TAB key). This is common practice in programming to make code easier to read.
This warning also exists to avoid dangling-else problem.

219: local variable «foo» shadows a variable at a preceding level

A local variable, i.e. a variable that is created within a function or callback, cannot have the same name as a global variable, an enum specifier, a function, or a variable declared higher up in the same function. The compiler cannot tell which variable you’re trying to alter.

It is customary to prefix global variables with ‘g’ (e.g. gTeam). However, global variables should be avoided where possible.

new team[MAX_PLAYERS]; // variable declared in the global scape
 
function(playerid)
{
    new team[MAX_PLAYERS]; // declared in the local scope, shadows the variable in the global scope, warning 219
    team[playerid] = random(5); // which variable are we trying to update here?
}

225: unreachable code

The indicated code will never run, because an instruction before (above) it causes a jump out of the function, out of a loop or elsewhere. Look for return, break, continue and goto instructions above the indicated line. Unreachable code can also be caused by an endless loop above the indicated line.

Example:

CMD:jetpack(playerid, params[])
{
	#pragma unused params
	if(IsPlayerAdmin(playerid))
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
	    return 1; // jumps out the command
	}
	else
	{
	    SendClientMessage(playerid, -1, "You are not admin!");
	    return 1; // jumps out the command
	}
	SendClientMessage(playerid, -1, "You typed command /jp"); // this code is not reachable and will not run.
}

Fixed:

CMD:jetpack(playerid, params[])
{
	#pragma unused params
	if(IsPlayerAdmin(playerid))
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
	}
	else
	{
	    SendClientMessage(playerid, -1, "You are not admin!");
	}
	SendClientMessage(playerid, -1, "You typed command /jp"); // this code will run.
	return 1; // jumps out the command
}

235: public function lacks forward declaration (symbol «symbol»)

Your public function is missing a forward declaration.

Bad:

public MyFunction()
{
    // blah
}

Good:

forward MyFunction();
 
public MyFunction()
{
    // blah
}

External Links

  • pawn-lang.pdf
Статус
Закрыто для дальнейших ответов.

Legends

  • #1

Доброго времени суток, уважаемые пользователи pawno-crmp.ru

такая проблема:
компелятор ругается на то что, в каждом case оператора switch без фигурных скобок может содержаться только один оператор.
а и еще такой Warning я не в курсе из-за чего возможно что-то где-то нечаянно упарол когда удалял Case не нужный мне 
в общем не умею объяснять вот ошибки и код:

error 002: only a single statement (or expression) can follow each «case»

warning 215: expression has no effect

warning 209: function «OnDialogResponse»

Строка Error 002 and warning 215:

return true;

Строка Warning 209:

}

Case перед return true;

Код:

	case 1425:
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                SetPlayerRaceCheckpoint(playerid, 1, 226.7233,-935.0458,40.5898, 0.0, 0.0, 0.0, 8);
	                SendClientMessage(playerid, COLOR_YELLOW, "[Ферма]: Место на карте отображено красной меткой");
	            }
	            case 1:
	            {
	                SetPlayerRaceCheckpoint(playerid, 1, 543.4575,-2823.9722,2.9735, 0.0, 0.0, 0.0, 8);
	                SendClientMessage(playerid, COLOR_YELLOW, "[Лесоруб]: Место на карте отображено красной меткой");
	            }
	        }
	        SetPVarInt(playerid, "pGpsWork", 1);
	    }
	    else
	    {
	        cmd_gps(playerid, inputtext);
	        return 1;
	    }
	}

Последнее редактирование модератором: 07.08.2016

  • #2

Замените case 1425 на if(dialogid == 1425):

Код:

if(dialogid == 1425)
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
            {
                SetPlayerRaceCheckpoint(playerid, 1, 226.7233,-935.0458,40.5898, 0.0, 0.0, 0.0, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "[Ферма]: Место на карте отображено красной меткой");
            }
            case 1:
            {
                SetPlayerRaceCheckpoint(playerid, 1, 543.4575,-2823.9722,2.9735, 0.0, 0.0, 0.0, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "[Лесоруб]: Место на карте отображено красной меткой");
            }
        }
        SetPVarInt(playerid, "pGpsWork", 1);
    }
    else
    {
        cmd_gps(playerid, inputtext);
        return 1;
    }
}

Последнее редактирование модератором: 07.08.2016

Legends

  • #3

@Elrmrnt-Kritik, ошибки с кодом

C:UsersАдминистратор-ПкDesktopMyProjectgamemodesnew.pwn(8231) : error 002: only a single statement (or expression) can follow each «case»
C:UsersАдминистратор-ПкDesktopMyProjecgamemodesnew.pwn(8231 — 8232) : error 029: invalid expression, assumed zero

Строка:

Legends

  • #4

@Elrmrnt-Kritik, а и еще до этого все работало хорошо без ошибок, варнингов, просто я добавлял туда кейс  мне нужен был, но потом его удалил, когда в игре протестировал, возможно что-то задел, но вроде бы все в порядке незнаю

  • #5

@Legends, даже не вижу вариантов решения, кроме как вертеть ваш код… 

if(dialogid == 1425)
{
if(response)
{
if(listitem == 0)
{
SetPlayerRaceCheckpoint(playerid, 1, 226.7233,-935.0458,40.5898, 0.0, 0.0, 0.0, 8);
SendClientMessage(playerid, COLOR_YELLOW, «[Ферма]: Место на карте отображено красной меткой»);
}
else if(listitem == 1)
{
SetPlayerRaceCheckpoint(playerid, 1, 543.4575,-2823.9722,2.9735, 0.0, 0.0, 0.0, 8);
SendClientMessage(playerid, COLOR_YELLOW, «[Лесоруб]: Место на карте отображено красной меткой»);
}
SetPVarInt(playerid, «pGpsWork», 1);
}
else
{
cmd_gps(playerid, inputtext);
return 1;
}
}

или так…

Код:

if(dialogid == 1425)
{
    if(response)
    {
		if(listitem == 0)
		{
			SetPlayerRaceCheckpoint(playerid, 1, 226.7233,-935.0458,40.5898, 0.0, 0.0, 0.0, 8);
			SendClientMessage(playerid, COLOR_YELLOW, "[Ферма]: Место на карте отображено красной меткой");
        	SetPVarInt(playerid, "pGpsWork", 1);
		}
		else if(listitem == 1)
		{
			SetPlayerRaceCheckpoint(playerid, 1, 543.4575,-2823.9722,2.9735, 0.0, 0.0, 0.0, 8);
			SendClientMessage(playerid, COLOR_YELLOW, "[Лесоруб]: Место на карте отображено красной меткой");
			SetPVarInt(playerid, "pGpsWork", 1);
		}
    }
    else
    {
        cmd_gps(playerid, inputtext);
        return 1;
    }
}

Последнее редактирование модератором: 07.08.2016

Legends

  • #7

@Legends, а причем здесь табулятор? Не хотите попробовать сделать на основе других диалогов типа DIALOG_STYLE_LIST? 

Legends

  • #8

Та табулятор, я думал то что ваше «вертеть» это означает менять положения кода…
Вот даже скрин как выглядит код, по расстановке.
[

cef65b909191.jpg

Дополнение к сообщению:

@Elrmrnt-Kritik, ну блин дело в том что все работало без ошибок и варнингов, только я добавил и убрал Case и все начались эти ошибки, варнинги , 2 варианта тоже эти не помогли

Последнее редактирование модератором: 07.08.2016

Legends

  • #9

@Elrmrnt-Kritik, и дело тут не в Case, я сам не в курсе где проблема, но даже если убрать этот кейс то нечего не изменится те же ошибки, те же варнинги как я описывал в теме

Последнее редактирование модератором: 07.08.2016

Legends

  • #10

up, не решил до сих пор, помогите господа знатоки пожалуйста  

Basis

Basis

chto tut doljno bit`!?
  • #11

ты уже разберись,ты будешь использовать if(dialogid == 1) или же case

error 002: only a single statement (or expression) can follow each «case»
данная ошибка обозначает что у тебя после кейса идёт dialogid и из-за этого скорее всего и остальные ошибки 

Legends

  • #12

@Basis, визде использую кейсы, если все менять под  if(dialog == 1), то придется около 1к строк поменять

Legends

  • #14

@Legends, а если так  83DDE2C:

Код:

	if(dialogid == 1425)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                SetPlayerRaceCheckpoint(playerid, 1, 226.7233,-935.0458,40.5898, 0.0, 0.0, 0.0, 8);
	                SendClientMessage(playerid, COLOR_YELLOW, "[Ферма]: Место на карте отображено красной меткой");
	        		SetPVarInt(playerid, "pGpsWork", 1);
	            }
	            case 1:
	            {
	                SetPlayerRaceCheckpoint(playerid, 1, 543.4575,-2823.9722,2.9735, 0.0, 0.0, 0.0, 8);
	                SendClientMessage(playerid, COLOR_YELLOW, "[Лесоруб]: Место на карте отображено красной меткой");
	                SetPVarInt(playerid, "pGpsWork", 1);
	            }
	        }
	    }
	    else
	    {
	        cmd_gps(playerid, inputtext);
	        return 1;
	    }
	}

Последнее редактирование модератором: 09.08.2016

Legends

  • #15

@Elrmrnt-Kritik, неа, ошибки 83DDE15:  

Код:

new.pwn(8230) : error 002: only a single statement (or expression) can follow each "case"
new.pwn(8230 -- 8231) : error 029: invalid expression, assumed zero 

Amfy

Гость
Статус
Закрыто для дальнейших ответов.

  1. 20.08.2016, 23:39


    #1

    Аватар для FiksoShooter

    Пользователь


    Помогите, не могу найти ответ, искал ошибки в гугле. Но пытался исправить ничего не выходило, если что, пишу регистрацию.

    Код HTML:

     D:UsersAdminDesktopDEATHMATCHgamemodesdeathmatch.pwn(56) : error 002: only a single statement (or expression) can follow each "case"
    D:UsersAdminDesktopDEATHMATCHgamemodesdeathmatch.pwn(61) : warning 209: function "OnDialogResponse" should return a value
    D:UsersAdminDesktopDEATHMATCHgamemodesdeathmatch.pwn(62) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    2 Errors.

    Код:

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    	new string[256];
    	switch(dialogid)
    	{
    	    case 1:
    	    {
    	    	if(response)
    			{
    			    if(!strlen(inputtext))
    				{
    				    format(string, sizeof(string), "{FFFFFF}Добро пожаловать на DeathMatch{FFFFFF}%s.n{FFFFFF}Аккаунт с данным ником не зарегистрирован.nnДля регистрации введите пароль:", GN(playerid));
    				    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Регистрация игрового аккаунта", string, "Далее", "Выход");
    				    return true;
    				}
    				for(new i = strlen(inputtext); i != 0; --i)
    				switch(inputtext[i])
    				{
        				case 'А'..'Я', 'а'..'я': return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{FF0000}Ошибка!", "{FFFFFF}Пароль должен содержать менее 6-ти или более 20-ти символовnБудьте добры, повторите попытку снова:", "Далее", "Выход");
    				}
    		 		strmid(Player[playerid][pPass], inputtext, 0, strlen(inputtext), 20);
    			}
    		}
    		else
    		{
    		    SendClientMessage(playerid, COLOR_RED, "Вы были кикнуты, чтобы выйти введите - /q.");
    		    Kick(playerid);
    		}
    	}
    	return 1;
    }


  2. 20.08.2016, 23:45


    #2

    Аватар для HarrWe

    Пользователь


    Люблю табуляцию Pro Pawn, cам сделаешь её.

    PHP код:


    public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
    {
        new 
    string[256];
        switch(
    dialogid)
        {
            case 
    1:
            {
                if(
    response)
                {
                    if(!
    strlen(inputtext))
                    {
                        
    format(stringsizeof(string), "{FFFFFF}Добро пожаловать на DeathMatch{FFFFFF}%s.n{FFFFFF}Аккаунт с данным ником не зарегистрирован.nnДля регистрации введите пароль:"GN(playerid));
                        
    ShowPlayerDialog(playerid1DIALOG_STYLE_INPUT"Регистрация игрового аккаунта"string"Далее""Выход");
                        return 
    true;
                    }
                    for(new 
    strlen(inputtext); != 0; --i)
                    switch(
    inputtext[i])
                    {
                        case 
    'А'..'Я''а'..'я': return ShowPlayerDialog(playerid1DIALOG_STYLE_INPUT"{FF0000}Ошибка!""{FFFFFF}Пароль должен содержать менее 6-ти или более 20-ти символовnБудьте добры, повторите попытку снова:""Далее""Выход");
                    }
                    
    strmid(Player[playerid][pPass], inputtext0strlen(inputtext), 20);
                }
                            else
                    {
                         
    SendClientMessage(playeridCOLOR_RED"Вы были кикнуты, чтобы выйти введите - /q.");
                         
    Kick(playerid);
                    }
            }
        }
        return 
    1;




  3. 20.08.2016, 23:48


    #3

    Аватар для FiksoShooter

    Пользователь


    Спасибо, не подумал. С меня +-сик.
    Тему можно зыкрывать.



  4. 21.08.2016, 11:56


    #4

    Цитата Сообщение от HarrWe
    Посмотреть сообщение

    Люблю табуляцию Pro Pawn, cам сделаешь её.

    Пользуйтесь нормальным редактором, который не впихивает пробелы посреди табов — тогда и не придётся валить всю вину на форум.
    P.S.: pawno не из их числа.
    P.P.S.: Закрыто.

    Индивидуально в ЛС по скриптингу не помогаю. Задавайте все свои вопросы

    здесь (click)

    .


public OnPlayerUpdate(playerid)
{
    if(noclipdata[playerid][cameramode] == CAMERA_MODE_FLY)
    {
        new keyss,ud,lr;
        GetPlayerKeys(playerid,keyss,ud,lr);

        if(noclipdata[playerid][mode] && (GetTickCount() - noclipdata[playerid][lastmove] > 100))
        {
            // If the last move was > 100ms ago, process moving the object the players camera is attached to
            MoveCamera(playerid);
        }

        // Is the players current key state different than their last keystate?
        if(noclipdata[playerid][udold] != ud || noclipdata[playerid][lrold] != lr)
        {
            if((noclipdata[playerid][udold] != 0 || noclipdata[playerid][lrold] != 0) && ud == 0 && lr == 0)
            {   // All keys have been released, stop the object the camera is attached to and reset the acceleration multiplier
                StopPlayerObject(playerid, noclipdata[playerid][flyobject]);
                noclipdata[playerid][mode]      = 0;
                noclipdata[playerid][accelmul]  = 0.0;
            }
            else
            {   // Indicates a new key has been pressed

                // Get the direction the player wants to move as indicated by the keys
                noclipdata[playerid][mode] = GetMoveDirectionFromKeys(ud, lr);

                // Process moving the object the players camera is attached to
                MoveCamera(playerid);
            }
        }
        noclipdata[playerid][udold] = ud; noclipdata[playerid][lrold] = lr; // Store current keys pressed for comparison next update
        return 0;
    }

    //--------------------------------------------------------------------------

    if(GetPlayerCameraMode(playerid) == 53)
    {
        new Float:pos[3];
        GetPlayerCameraPos(playerid,pos[0],pos[1],pos[2]);
        if( pos[0] < -7000.0 || pos[0] > 7000.0 || pos[1] < -7000.0 || pos[1] > 7000.0 || pos[2] < -7000.0 || pos[2] > 7000.0 )
        {
        //    OnPlayerCheat(playerid, true, "16");
            return 0;
        }
    }
   
    SetPlayerData(playerid, P_AFK_TIME, 0);
    UpdateHud(playerid);
    if(IsPlayerDriver(playerid))
    {
        new keys, gas_brake, left_right;

        GetPlayerKeys(playerid, keys, gas_brake, left_right);

        // SendClientMessage(playerid, -1, IntToString(gas_brake));

        new pedal_type = PEDAL_TYPE_NONE;

        if((keys & KEY_SPRINT) && !(keys & KEY_JUMP || keys & KEY_HANDBRAKE))
            pedal_type = PEDAL_TYPE_GAS;
       
        else if(keys & KEY_JUMP && !(keys & KEY_SPRINT || keys & KEY_HANDBRAKE))
            pedal_type = PEDAL_TYPE_BRAKE;

        player_press_pedal[playerid] = pedal_type;
    }

    /*
    new current_weapon = GetPlayerWeapon(playerid);

    if(current_weapon != GetPVarInt(playerid, "current_weapon"))
    {
        OnPlayerChangeWeapon(playerid, current_weapon);

        SetPVarInt(playerid, "current_weapon", current_weapon);
    }
    */

    if(GetPlayerTempJobCheckAnim(playerid))
    {
        new anim_index = GetPlayerAnimationIndex(playerid);
       
        /*
            new fmt_str[32];
           
            format(fmt_str, sizeof fmt_str, "index: %d", anim_index);
            SendClientMessage(playerid, 0xCECECEFF, fmt_str);
        */
       
        switch(GetPlayerTempJob(playerid))
        {
            case TEMP_JOB_LOADER:
            {
                if(!GetPlayerSex(playerid))
                {
                    if(!(anim_index == 259 || anim_index == 1189 || anim_index == 1224))
                    {
                        anim_index = -1;
                    }
                }
                else
                {  
                    if(!(anim_index == 259 || anim_index == 260 || anim_index == 1275 || anim_index == 1276 || anim_index == 1289))
                    {
                        anim_index = -1;
                    }
                }
               
                if(anim_index == -1)
                {
                    SetPlayerTempJobCheckAnim(playerid, false);
                    SetPlayerTempJobState(playerid, TEMP_JOB_STATE_LOADER_DROP_LOAD);
                }
            }
            case TEMP_JOB_MINER:
            {
                if(GetPlayerTempJobState(playerid) == TEMP_JOB_STATE_MINER_UNLOAD)
                {
                    if(!(anim_index == 616 || anim_index == 1189 || anim_index == 1224))
                        SetPlayerTempJobState(playerid, TEMP_JOB_STATE_MINER_DROP_LOAD);
                }
            }
            case TEMP_JOB_FACTORY:
            {
                if(!GetPlayerSex(playerid))
                {
                    if(!(anim_index == 259 || anim_index == 949 || anim_index == 1189 || anim_index == 1224 || anim_index == 1257 || anim_index == 1269))
                    {
                        anim_index = -1;
                    }
                }
                else
                {  
                    if(!(anim_index == 259 || anim_index == 1196 || anim_index == 1275 || anim_index == 1276 || anim_index == 1269 || anim_index == 1283))
                    {
                        anim_index = -1;
                    }
                }

                if(anim_index == -1)
                {
                    SetPlayerTempJobCheckAnim(playerid, false);
                    SetPlayerTempJobState(playerid, TEMP_JOB_STATE_FACTORY_DROP_P);
                }
            }
            case TEMP_JOB_LUMBERJACK:
            {
                if(!(anim_index == 1189 || anim_index == 1224 || anim_index == 260 || anim_index == 1275 || anim_index == 1276))
                {
                    anim_index = -1;
                }

                if(anim_index == -1)
                    SetPlayerTempJobState(playerid, TEMP_JOB_STATE_LUMBERJACK_DROP);
            }
            default:
            {
                SetPlayerTempJobCheckAnim(playerid, false);
            }
        }
    }
    /*
    if(GetPlayerTempJob(playerid) == TEMP_JOB_MINER)
    {
        if(GetPlayerTempJobState(playerid) == TEMP_JOB_STATE_MINER_UNLOAD)
        {
            new anim_idx = GetPlayerAnimationIndex(playerid);
           
            if(!(anim_idx == 616 || anim_idx == 1189 || anim_idx == 1224))
                SetPlayerTempJobState(playerid, TEMP_JOB_STATE_MINER_DROP_LOAD);
        }
    }
    */
   
    if(notification_timer[playerid] > 0)
    {
        notification_timer[playerid] --;
    }
   
    if(notification_timer[playerid] == 0)
    {
        TextDrawHideForPlayer(playerid, notification_background);
        PlayerTextDrawHide(playerid, notification_text[playerid]);
    }
   
    if(GetPVarInt(playerid, "test") == 1)
    {
        new fmt_str[64];
       
        format(fmt_str, sizeof fmt_str, "a_index: %d", GetPlayerAnimationIndex(playerid));
        SendClientMessage(playerid, 0xCECECEFF, fmt_str);
    }

    if(GetPlayerWeaponState(playerid) == 2) SetPlayerData(playerid, P_WEAPON_RELOADING, false);
    if(GetPlayerWeaponState(playerid) == 3 && !GetPlayerData(playerid, P_WEAPON_RELOADING))
    {
        SetPlayerData(playerid, P_WEAPON_RELOADING, true);

        switch(GetPlayerWeapon(playerid))
        {
            case 22:
            {
                if(GetPlayerData(playerid, P_SKILL_COLT) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][0]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[0] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][0] = 0;

                        AddPlayerData(playerid, P_SKILL_COLT, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_colt", GetPlayerData(playerid, P_SKILL_COLT));

                        SetPlayerSkillLevel(playerid, 0, GetPlayerData(playerid, P_SKILL_COLT) * 10);
                    }
                }
            }
            case 23:
            {
                if(GetPlayerData(playerid, P_SKILL_SDPISTOL) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][1]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[1] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][1] = 0;

                        AddPlayerData(playerid, P_SKILL_SDPISTOL, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_sdpistol", GetPlayerData(playerid, P_SKILL_SDPISTOL));

                        SetPlayerSkillLevel(playerid, 1, GetPlayerData(playerid, P_SKILL_SDPISTOL) * 10);
                    }
                }
            }
            case 24:
            {
                if(GetPlayerData(playerid, P_SKILL_DEAGLE) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][2]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[2] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][2] = 0;

                        AddPlayerData(playerid, P_SKILL_DEAGLE, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_deagle", GetPlayerData(playerid, P_SKILL_DEAGLE));

                        SetPlayerSkillLevel(playerid, 2, GetPlayerData(playerid, P_SKILL_DEAGLE) * 10);
                    }
                }
            }
            case 25:
            {
                if(GetPlayerData(playerid, P_SKILL_SHOTGUN) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][3]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[3] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][3] = 0;

                        AddPlayerData(playerid, P_SKILL_SHOTGUN, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_shotgun", GetPlayerData(playerid, P_SKILL_SHOTGUN));

                        SetPlayerSkillLevel(playerid, 3, GetPlayerData(playerid, P_SKILL_SHOTGUN) * 10);
                    }
                }
            }
            case 29:
            {
                if(GetPlayerData(playerid, P_SKILL_MP5) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][4]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[4] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][4] = 0;

                        AddPlayerData(playerid, P_SKILL_MP5, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_mp5", GetPlayerData(playerid, P_SKILL_MP5));

                        SetPlayerSkillLevel(playerid, 7, GetPlayerData(playerid, P_SKILL_MP5) * 10);
                    }
                }
            }
            case 30:
            {
                if(GetPlayerData(playerid, P_SKILL_AK47) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][5]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[5] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][5] = 0;

                        AddPlayerData(playerid, P_SKILL_AK47, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_ak47", GetPlayerData(playerid, P_SKILL_AK47));

                        SetPlayerSkillLevel(playerid, 8, GetPlayerData(playerid, P_SKILL_AK47) * 10);
                    }
                }
            }
            case 31:
            {
                if(GetPlayerData(playerid, P_SKILL_M4) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][6]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[6] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][6] = 0;

                        AddPlayerData(playerid, P_SKILL_M4, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_m4", GetPlayerData(playerid, P_SKILL_M4));

                        SetPlayerSkillLevel(playerid, 9, GetPlayerData(playerid, P_SKILL_M4) * 10);
                    }
                }
            }
            case 34:
            {
                if(GetPlayerData(playerid, P_SKILL_SNIPER_RIFLE) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][7]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[7] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][7] = 0;

                        AddPlayerData(playerid, P_SKILL_SNIPER_RIFLE, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_sniper_rifle", GetPlayerData(playerid, P_SKILL_SNIPER_RIFLE));

                        SetPlayerSkillLevel(playerid, 10, GetPlayerData(playerid, P_SKILL_SNIPER_RIFLE) * 10);
                    }
                }
            }
            case 26:
            {
                if(GetPlayerData(playerid, P_SKILL_SAWNOFF) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][8]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[8] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][8] = 0;

                        AddPlayerData(playerid, P_SKILL_SAWNOFF, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_sawnoff", GetPlayerData(playerid, P_SKILL_SAWNOFF));

                        SetPlayerSkillLevel(playerid, 4, GetPlayerData(playerid, P_SKILL_SAWNOFF) * 10);
                    }
                }
            }
            case 27:
            {
                if(GetPlayerData(playerid, P_SKILL_COMBAT_SG) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][9]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[9] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][9] = 0;

                        AddPlayerData(playerid, P_SKILL_COMBAT_SG, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_combat_sg", GetPlayerData(playerid, P_SKILL_COMBAT_SG));

                        SetPlayerSkillLevel(playerid, 5, GetPlayerData(playerid, P_SKILL_COMBAT_SG) * 10);
                    }
                }
            }
            case 28:
            {
                if(GetPlayerData(playerid, P_SKILL_MICRO_UZI) < 100)
                {
                    g_player[playerid][P_RELOADINGS_COUNT][10]++;

                    if(GetPlayerData(playerid, P_RELOADINGS_COUNT)[10] == 3)
                    {
                        g_player[playerid][P_RELOADINGS_COUNT][10] = 0;

                        AddPlayerData(playerid, P_SKILL_MICRO_UZI, +, 1);
                        UpdatePlayerDatabaseInt(playerid, "skill_micro_uzi", GetPlayerData(playerid, P_SKILL_MICRO_UZI));

                        SetPlayerSkillLevel(playerid, 6, GetPlayerData(playerid, P_SKILL_MICRO_UZI) * 10);
                    }
                }
           
            if(FlyInfo[playerid][fType] == 1)
            {
                new keys, ud, lr;
                GetPlayerKeys(playerid, keys, ud, lr);
                new Float:CP[3], Float:FV[3];
                GetPlayerCameraPos(playerid, CP[0], CP[1], CP[2]);
                GetPlayerCameraFrontVector(playerid, FV[0], FV[1], FV[2]);
                if(FlyInfo[playerid][fKeys][0] != ud || FlyInfo[playerid][fKeys][1] != lr)
                {
                    if((FlyInfo[playerid][fKeys][0] != 0 || FlyInfo[playerid][fKeys][1] != 0) && ud == 0 && lr == 0)
                    {
                        StopDynamicObject(FlyInfo[playerid][fObject]);
                        FlyInfo[playerid][fDirection] = 0;
                    }
                    else
                    {
                        if(lr < 0)
                        {
                            if(ud < 0) FlyInfo[playerid][fDirection] = MOVE_FORWARD_LEFT;
                            else if(ud > 0) FlyInfo[playerid][fDirection] = MOVE_BACK_LEFT;
                            else FlyInfo[playerid][fDirection] = MOVE_LEFT;
                            MovePlayerCamera(playerid, CP, FV);
                        }
                        else if(lr > 0)
                        {
                            if(ud < 0) FlyInfo[playerid][fDirection] = MOVE_FORWARD_RIGHT;
                            else if(ud > 0) FlyInfo[playerid][fDirection] = MOVE_BACK_RIGHT;
                            else FlyInfo[playerid][fDirection] = MOVE_RIGHT;
                            MovePlayerCamera(playerid, CP, FV);
                        }
                        else if(ud < 0)
                        {
                            FlyInfo[playerid][fDirection] = MOVE_FORWARD;
                            MovePlayerCamera(playerid, CP, FV);
                        }
                        else if(ud > 0)
                        {
                            FlyInfo[playerid][fDirection] = MOVE_BACK;
                            MovePlayerCamera(playerid, CP, FV);
                        }
                        else FlyInfo[playerid][fDirection] = -1;
                    }
                    FlyInfo[playerid][fKeys][0] = ud;
                    FlyInfo[playerid][fKeys][1] = lr;
                }
                else if(FlyInfo[playerid][fDirection] && (GetTickCount() - FlyInfo[playerid][fTick] > 100))
                {
                    if((FlyInfo[playerid][fKeys][0] != 0 || FlyInfo[playerid][fKeys][1] != 0) && ud == 0 && lr == 0)
                    {
                        StopDynamicObject(FlyInfo[playerid][fObject]);
                        FlyInfo[playerid][fDirection] = 0;
                    }
                    else MovePlayerCamera(playerid, CP, FV);
                }
            }
        }
        else ResetPlayerWeapons(playerid);
    }
    return 1;
}

Как исправить Error
Автор: neka

Значение Error можно посмотреть здесь.

error 040: duplicate «case» label (value 28)

Это означает что case стаким значением повторяется. Решение этой проблемы простое — нам нужно цифру 28 изменит на другую (в той строчке на которую жалуется )

error 032: array index out of bounds (variable «JoinPed»)

Это означает что индекс массива превышен (но не всегда, смотрим дальше) Пример:

131 — массив поигравшись с ним я понял что дело не в нем, а в чём же спросите вы? Пример данной ошибки:

Код: Выделить всё

else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[98][0]; 

как видим — JoinPed[123] сначало с таким значением, а потом JoinPed[98]. Решение простое: JoinPed[123] число в данных скобках должно быть одинаковым. Пример:

Код: Выделить всё

else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[123][0]; 

error 037: invalid string (possibly non-terminated string)

Это означает что строка неправильная, а точнее где то допущена ошибка:

Код: Выделить всё

else if(PlayerInfo[targetid][pRank] == 4) { rangz = "Зам.модера; }

как видим нам после слова «модера» не хватает «. Правим:

Код: Выделить всё

else if(PlayerInfo[targetid][pRank] == 4) { rangz = "Зам.модера"; }

error 001: expected token: «,», but found «;»

Это значит что мы пропустили знак или скобку (в данном примере скобку) Пример:

Код: Выделить всё

public SaveProdykts()
{
    new idx;
    new File: file2;
    while (idx < sizeof(ProdyktsInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%dn",
        ProdyktsInfo[idx][prSous],
        ProdyktsInfo[idx][prPizza],
        ProdyktsInfo[idx][prMilk],
        ProdyktsInfo[idx][prJuice],
        ProdyktsInfo[idx][prSpirt],
        ProdyktsInfo[idx][prChicken],
        ProdyktsInfo[idx][prKolbasa],
        ProdyktsInfo[idx][prFish],
        ProdyktsInfo[idx][prIceCream],
        ProdyktsInfo[idx][prChips],
        ProdyktsInfo[idx][prZamProd];
        if(idx == 0)
        {
            file2 = fopen("[prodykts]/prodykts.cfg", io_write);
        }
        else
        
{
            file2 = fopen("[prodykts]/prodykts.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}

смотрим на:

и вим что мы ппропустили )

Правим:

И в итоге:

Код: Выделить всё

public SaveProdykts()
{
    new idx;
    new File: file2;
    while (idx < sizeof(ProdyktsInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%dn",
        ProdyktsInfo[idx][prSous],
        ProdyktsInfo[idx][prPizza],
        ProdyktsInfo[idx][prMilk],
        ProdyktsInfo[idx][prJuice],
        ProdyktsInfo[idx][prSpirt],
        ProdyktsInfo[idx][prChicken],
        ProdyktsInfo[idx][prKolbasa],
        ProdyktsInfo[idx][prFish],
        ProdyktsInfo[idx][prIceCream],
        ProdyktsInfo[idx][prChips],
        ProdyktsInfo[idx][prZamProd]);< ----------- И вот наша скобка 
        if
(idx == 0)
        {
            file2 = fopen("[prodykts]/prodykts.cfg", io_write);
        }
        else
        
{
            file2 = fopen("[prodykts]/prodykts.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;

error 002: only a single statement (or expression) can follow each «case»

Это означает что у вас после «case» идет if(dialogid == ). Пример:

Код: Выделить всё

  case 7507: 
    
{ 
        if
(response) ClothesSex[playerid] = 1; 
        else ClothesSex
[playerid] = 2; 
        ShowPlayerDialog
(playerid,7504,2,"??????? ??????","{A0B0D0}?????????? ?????? {7CC000}300$n{A0B0D0}??????? ?????? {7CC000}300$n{A0B0D0}???????????? ?????? {7CC000}300$n{A0B0D0}?????","???????","?????"); 
        return 1
; 
    
} 
if(dialogid == 7504)  <------------------- вот наша и ошибка 
    
{ 
        if
(response) 
        
{ 
              SetCameraBehindPlayer
(playerid); TogglePlayerControllable(playerid, 1); 
              SetPlayerSkin
(playerid, PlayerInfo[playerid][pModel]); 
              ClothesRun
[playerid] = 0; 
            return 1
; 
        
}

Решение простое: if(dialogid == 7504) это нам нужно заменить на case как и последующий диалог !

Код: Выделить всё

case 7504:  <------------------- вот так это выглядит
    

        if(
response
        { 
              
SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid1); 
              
SetPlayerSkin(playeridPlayerInfo[playerid][pModel]); 
              
ClothesRun[playerid] = 0
            return 
1
        }  

error 004: function «%s» is not implemented

Это означает что мы пропустили скобку. Мой совет:

  • проверить весь код в ручную
  • на форуме был урок как найти не по ставленую скобку
  • Можно воспользоватся notepad++ там показы линии открытых скобок и тогда можно найти эту скобку

error 017: undefined symbol %s

Это означает что мы не поставили переменную new. Пример:

Решение — ко всем new добавим:


• Errors
001 — expected token: token, but found token
A required token is omitted.
002 — only a single statement (or expression) can follow each “case”
Every case in a switch statement can hold exactly one statement. To put multiple statements in a case, enclose these statements between braces (which creates a compound statement).
003 — declaration of a local variable must appear in a compound block
The declaration of a local variable must appear between braces (“{. . .}”) at the active scope level.
When the parser flags this error, a variable declaration appears as the only statement of a function or the only statement below an if, else, for, while or do statement. Note that, since local variables are accessible only from (or below) the scope that their declaration appears in, having a variable declaration as the only statement at any scope is useless.
004 — function name is not implemented
There is no implementation for the designated function. The function may have been “forwardly” declared —or prototyped— but the full function definition including a statement, or statement block, is missing.
005 — function may not have arguments
The function main is the program entry point. It may not have arguments.
006 — must be assigned to an array
String literals or arrays must be assigned to an array. This error message may also indicate a missing index (or indices) at the array on the right side of the “=” sign.
007 — operator cannot be redefined
Only a select set of operators may be redefined, this operator is not one of them. See page 84 for details.
008 — must be a constant expression; assumed zero
The size of arrays and the parameters of most directives must be constant values.
009 — invalid array size (negative, zero or out of bounds)
The number of elements of an array must always be 1 or more. In addition, an array that big that it does exceeds the range of a cell is invalid too.
010 — illegal function or declaration
The compiler expects a declaration of a global variable or of a function at the current location, but it cannot interpret it as such.
011 — invalid outside functions
The instruction or statement is invalid at a global level. Local labels and (compound) statements are only valid if used within functions.
012 — invalid function call, not a valid address
The symbol is not a function.
013 — no entry point (no public functions)
The file does not contain a main function or any public function. The compiled file thereby does not have a starting point for the execution.
014 — invalid statement; not in switch
The statements case and default are only valid inside a switch statement.
015 — “default” must be the last clause in switch statement pawn requires the default clause to be the last clause in a switch statement.
016 — multiple defaults in “switch”
Each switch statement may only have one default clause.
017 — undefined symbol symbol
The symbol (variable, constant or function) is not declared.
018 initialization data exceeds declared size
Initialization: 63
An array with an explicit size is initialized, but the number of initiallers exceeds the number of elements specified. For example, in “arr[3]={1,2,3,4};” the array is specified to have three elements, but there are four initiallers.
019 — not a label: name
A goto statement branches to a symbol that is not a label.
020 — invalid symbol name
A symbol may start with a letter, an underscore or an “at” sign (“@”) and may be followed by a series of letters, digits, underscore characters and “@” characters.
021 — symbol already defined: identifier
The symbol was already defined at the current level.
022 — must be lvalue (non-constant)
The symbol that is altered (incremented, decremented, assigned a value, etc.) must be a variable that can be modified (this kind of variable is called an lvalue). Functions, string literals, arrays and constants are no lvalues. Variables declared with the “const” attribute are no lvalues either.
023 — array assignment must be simple assignment
When assigning one array to another, you cannot combine an arithmetic operation with the assignment (e.g., you cannot use the “+=” operator).
024 — “break” or “continue” is out of context
The statements break and continue are only valid inside the context of a loop (a do, for or while statement). Unlike the languages C/C++ and Java, break does not jump out of a switch statement.
025 — function heading differs from prototype
The number of arguments given at a previous declaration of the function does not match the number of arguments given at the current declaration.
026 — no matching “#if…”
The directive #else or #endif was encountered, but no matching #if directive was found.
027 — invalid character constant
One likely cause for this error is the occurrence of an unknown escape sequence, like “x”. Putting multiple characters between single quotes, as in ’abc’ also issues this error message. A third cause for this error is a situation where a character constant was expected, but none (or a non-character expression) were provided.
028 — invalid subscript (not an array or too many subscripts): identifier
The subscript operators “[” and “]” are only valid with arrays. The number of square bracket pairs may not exceed the number of dimensions of the array.
029 — invalid expression, assumed zero
The compiler could not interpret the expression.
030 — compound statement not closed at the end of file (started at line number)
An unexpected end of file occurred. One or more compound statements are still unfinished (i.e. the closing brace “}” has not been found). The line number where the compound statement started is given in the message.
031 — unknown directive
The character “#” appears first at a line, but no valid directive was specified.
032 — array index out of bounds
The array index is larger than the highest valid entry of the array.
033 — array must be indexed (variable name)
An array as a whole cannot be used in a expression; you must indicate an element of the array between square brackets.
034 — argument does not have a default value (argument index)
You can only use the argument placeholder when the function definition specifies a default value for the argument.
035 — argument type mismatch (argument index)
The argument that you pass is different from the argument that the function expects, and the compiler cannot convert the passed-in argument to the required type. For example, you cannot pass the literal value “1” as an argument when the function expects an array or a reference.
036 — empty statement
The line contains a semicolon that is not preceded by an expression. pawn does not support a semicolon as an empty statement, use an empty compound block instead.
037 — invalid string (possibly non-terminated string)
A string was not well-formed; for example, the final quote that ends a string is missing, or the filename for the #include directive was not enclosed in double quotes or angle brackets.
038 — extra characters on line
There were trailing characters on a line that contained a directive (a directive starts with a # symbol, see page 116).
039 — constant symbol has no size
A variable has a size (measured in a number of cells), a constant has no size. That is, you cannot use a (symbolic) constant with the sizeof operator, for example.
040 — duplicate “case” label (value value)
A preceding “case label” in the list of the switch statement evaluates to the same value.
041 — invalid ellipsis, array size is not known
You used a syntax like “arr[] = { 1, … };”, which is invalid, because the compiler cannot deduce the size of the array from the declaration.
042 — invalid combination of class specifiers
A function or variable is denoted as both “public” and “native”, which is unsupported. Other combinations may also be unsup- ported; for example, a function cannot be both “public” and “stock” (a variable may be declared both “public” and “stock”).
043 — character constant value exceeds range for a packed string/array
When the error occurs on a literal string, it is usually an attempt to store a Unicode character in a packed string where a packed character is 8-bits. For a literal array, one of the constants does not fit in the range for packed characters.
044 — positional parameters must precede all named parameters
When you mix positional parameters and named parameters in a function call, the positional parameters must come first.
045 — too many function arguments
The maximum number of function arguments is currently limited to 64.
046 — unknown array size (variable name)
For array assignment, the size of both arrays must be explicitly defined, also if they are passed as function arguments.
047 — array sizes do not match, or destination array is too small
For array assignment, the arrays on the left and the right side of the assignment operator must have the same number of dimensions. In addition:
— for multi-dimensional arrays, both arrays must have the same size —note that an unpacked array does not fit in a packed array with the same number of elements;
— for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side.
When passing arrays to a function argument, these rules also hold for the array that is passed to the function (in the function call) versus the array declared in the function definition.
When a function returns an array, all return statements must specify an array with the same size and dimensions.
048 — array dimensions do not match
For an array assignment, the dimensions of the arrays on both sides of the “=” sign must match; when passing arrays to a function argument, the arrays passed to the function (in the function call) must match with the definition of the function arguments.
When a function returns an array, all return statements must specify an array with the same size and dimensions.
049 — invalid line continuation
A line continuation character (a backslash at the end of a line) is at an invalid position, for example at the end of a file or in a single line comment.
050 — invalid range
A numeric range with the syntax “n1 .. n2”, where n1 and n2 are numeric constants, is invalid. Either one of the values in not a valid number, or n1 is not smaller than n2.
051 — invalid subscript, use “[ ]” operators on major dimensions and for named indices
You can use the “character array index” operator (braces: “{ }” only for the last dimension, and only when indexing the array with a number. For other dimensions, and when indexing the array with a “symbolic index” (one that starts with a “.”), you must use the cell index operator (square brackets: “[ ]”).
052 — multi-dimensional arrays must be fully initialized
If an array with more than one dimension is initialized at its declaration, then there must be equally many literal vectors/sub- arrays at the right of the equal sign (“=”) as specified for the major dimension(s) of the array.
053 — exceeding maximum number of dimensions
The current implementation of the pawn compiler only supports arrays with one or two dimensions.
054 — unmatched closing brace
A closing brace (“}”) was found without matching opening brace (“{”).
055 — start of function body without function header
An opening brace (“{”) was found outside the scope of a function. This may be caused by a semicolon at the end of a preceding function header.
056 — arrays, local variables and function arguments cannot be public
A local variable or a function argument starts with the character “@”, which is invalid.
057 — unfinished expression before compiler directive
Compiler directives may only occur between statements, not inside a statement. This error typically occurs when an expression statement is split over multiple lines and a compiler directive appears between the start and the end of the expression. This is not supported.
058 — duplicate argument; same argument is passed twice
In the function call, the same argument appears twice, possibly through a mixture of named and positional parameters.
059 — function argument may not have a default value (variable name)
All arguments of public functions must be passed explicitly. Public functions are typically called from the host application, who has no knowledge of the default parameter values. Arguments of user defined operators are implied from the expression and cannot be inferred from the default value of an argument.
060 — multiple “#else” directives between “#if . . . #endif
Two or more #else directives appear in the body between the matching #if and #endif.
061 — “#elseif” directive follows an “#else” directive
All #elseif directives must appear before the #else directive. This error may also indicate that an #endif directive for a higher level is missing.
062 — number of operands does not fit the operator
When redefining an operator, the number of operands that the operator has (1 for unary operators and 2 for binary operators) must be equal to the number of arguments of the operator function.
063 — function result tag of operator name must be name
Logical and relational operators are defined as having a result that is either true (1) or false (0) and having a “bool:” tag. A user defined operator should adhere to this definition.
064 — cannot change predefined operators
One cannot define operators to work on untagged values, for example, because pawn already defines this operation.
065 — function argument may only have a single tag (argument number)
In a user defined operator, a function argument may not have multiple tags.
066 — function argument may not be a reference argument or an array (argument number)
In a user defined operator, all arguments must be cells (non-arrays) that are passed “by value”.
067 — variable cannot be both a reference and an array (variable name)
A function argument may be denoted as a “reference” or as an array, but not as both.
068 — invalid rational number precision in #pragma
The precision was negative or too high. For floating point rational numbers, the precision specification should be omitted.
069 — rational number format already defined
This #pragma conflicts with an earlier #pragma that specified a different format.
070 — rational number support was not enabled
A rational literal number was encountered, but the format for rational numbers was not specified.
071 — user-defined operator must be declared before use (func- tion name)
Like a variable, a user-defined operator must be declared before its first use. This message indicates that prior to the declaration of the user-defined operator, an instance where the operator was used on operands with the same tags occurred. This may either indicate that the program tries to make mixed use of the default operator and a user-defined operator (which is unsupported), or that the user-defined operator must be “forwardly declared”.
072 — “sizeof” operator is invalid on “function” symbols
You used something like “sizeof MyCounter” where the symbol “MyCounter” is not a variable, but a function. You cannot request the size of a function.
073 — function argument must be an array (argument name)
The function argument is a constant or a simple variable, but the function requires that you pass an array.
074 — #define pattern must start with an alphabetic character
Any pattern for the #define directive must start with a letter, an underscore (“_”) or an “@”-character. The pattern is the first word that follows the #define keyword.
075 — input line too long (after substitutions)
Either the source file contains a very long line, or text substitutions make a line that was initially of acceptable length grow beyond its bounds. This may be caused by a text substitution that causes recursive substitution (the pattern matching a portion of the replacement text, so that this part of the replacement text is also matched and replaced, and so forth).
076 — syntax error in the expression, or invalid function call
The expression statement was not recognized as a valid statement (so it is a “syntax error”). From the part of the string that was parsed, it looks as if the source line contains a function call in a “procedure call” syntax (omitting the parentheses), but the function result is used —assigned to a variable, passed as a parameter, used in an expression. . .
077 — malformed UTF-8 encoding, or corrupted file: filename
The file starts with an UTF-8 signature, but it contains encodings that are invalid UTF-8. If the source file was created by an editor or converter that supports UTF-8, the UTF-8 support is non-conforming.
078 — function uses both “return” and “return <value>”
The function returns both with and without a return value. The function should be consistent in always returning with a function result, or in never returning a function result.
079 — inconsistent return types (array & non-array)
The function returns both values and arrays, which is not allowed. If a function returns an array, all return statements must specify an array (of the same size and dimensions).
080 — unknown symbol, or not a constant symbol (symbol name)
Where a constant value was expected, an unknown symbol or a non-constant symbol (variable) was found.
082 — user-defined operators and native functions may not have states
Only standard and public functions may have states.
083 — a function or variable may only belong to a single automa- ton (symbol name)
There are multiple automatons in the state declaration for the indicated function or variable, which is not supported. In the case of a function: all instances of the function must belong to the same automaton. In the case of a variable: it is allowed to have several variables with the same name belonging to different automatons, but only in separate declarations —these are distinct variables.
084 — state conflict: one of the states is already assigned to another implementation (symbol name)
The specified state appears in the state specifier of two implemen- tations of the same function.
085 — no states are defined for symbol name
When this error occurs on a function, this function has a fall-back implementation, but no other states. If the error refers to a variable, this variable does not have a list of states between the < and > characters. Use a state-less function or variable instead.
086 — unknown automaton name
The “state” statement refers to an unknown automaton.
087 — unknown state name for automaton name
The “state” statement refers to an unknown state (for the specified automaton).
088 — public variables and local variables may not have states (symbol name)
Only standard (global) variables may have a list of states (and an automaton) at the end of a declaration.
089 — state variables may not be initialized (symbol name)
Variables with a state list may not have initializers. State variables should always be initialized through an assignment (instead of at their declaration), because their initial value is indeterminate.
090 — public functions may not return arrays (symbol name)
A public function may not return an array. Returning arrays is allowed only for normal functions.
091 — first constant in an enumerated list must be initialized (symbol name)
The first constant in a list of enumerated symbolic constants must be set to a value. Any subsequent symbol is automatically set the the value of the preceding symbol +1.
092 — invalid number format
A symbol started with a digit, but is is not a valid number.
093 — array fields with a size may only appear in the final dimension
In the final dimension (the “minor” dimension), the fields of an array may optionally be declared with a size that is different from a single cell. On the major dimensions of an array, this is not valid, however.
094 — invalid subscript, subscript does not match array definition regarding named indices (symbol name)
Either the array was declared with symbolic subscripts and you are indexing it with an expression, or you are indexing the array with a symbolic subscript which is not defined for the array.
• Fatal Errors
100 — cannot read from file: filename
The compiler cannot find the specified file or does not have access to it.
101 — cannot write to file: filename
The compiler cannot write to the specified output file, probably caused by insufficient disk space or restricted access rights (the file could be read-only, for example).
102 — table overflow: table name
An internal table in the pawn parser is too small to hold the required data. Some tables are dynamically growable, which means that there was insufficient memory to resize the table. The “table name” is one of the following:
“staging buffer”: the staging buffer holds the code generated for an expression before it is passed to the peephole optimizer. The
staging buffer grows dynamically, so an overflow of the staging buffer basically is an “out of memory” error.
“loop table”: the loop table is a stack used with nested do, for, and while statements. The table allows nesting of these statements up to 24 levels.
“literal table”: this table keeps the literal constants (numbers, strings) that are used in expressions and as initiallers for arrays. The literal table grows dynamically, so an overflow of the literal table basically is an “out of memory” error.
“compiler stack”: the compiler uses a stack to store temporary information it needs while parsing. An overflow of this stack is probably caused by deeply nested (or recursive) file inclusion. The compiler stack grows dynamically, so an overflow of the compiler stack basically is an “out of memory” error.
“option table”: in case that there are more options on the command line or in the response file than the compiler can cope with.
103 — insufficient memory
General “out of memory” error.
104 — incompatible options: option versus option
Two option that are passed to the pawn compiler conflict with each other, or an option conflicts with the configuration of the pawn compiler.
105 — numeric overflow, exceeding capacity
A numeric constant, notably a dimension of an array, is too large for the compiler to handle. For example, when compiled as a 16-bit application, the compiler cannot handle arrays with more than 32767 elements.
106 — compiled script exceeds the maximum memory size
(number bytes)
The memory size for the abstract machine that is needed to run the script exceeds the value set with #pragma amxlimit. This means that the script is too large to be supported by the host.
You might try reducing the script’s memory requirements by:
— setting a smaller stack/heap area —see #pragma dynamic at page 119;
— using packed strings instead of unpacked strings —see pages 99 and 136;
— using overlays —see pages 120 and page 170 for more information on overlays.
— putting repeated code in separate functions;
— putting repeated data (strings) in global variables;
— trying to find more compact algorithms to perform the same task.
107 — too many error/warning messages on one line
A single line that causes several error/warning messages is often an indication that the pawn parser is unable to “recover” from an earlier error. In this situation, the parser is unlikely to make any sense of the source code that follows —producing only (more) inappropriate error messages. Therefore, compilation is halted.
108 — codepage mapping file not found
The file for the codepage translation that was specified with the -c compiler option or the #pragma codepage directive could not be loaded.
109 — invalid path: path name
A path, for example for include files or codepage files, is invalid. Check the compiler options and, if used, the configuration file.
110 — assertion failed: expression
Compile-time assertion failed.
111 — user error: message
The parser fell on an #error directive.
112 — overlay function name exceeds limit by value bytes
The size of a function is too large for the overlay system. To fix this issue, you will have to split the function into two (or more) functions.
• Warnings
200 — symbol is truncated to number characters
The symbol is longer than the maximum symbol length. The maximum length of a symbol depends on whether the symbol is native, public or neither. Truncation may cause different symbol names to become equal, which may cause error 021 or warning 219.
201 — redefinition of constant/macro (symbol name)
The symbol was previously defined to a different value, or the text substitution macro that starts with the prefix name was redefined with a different substitution text.
202 — number of arguments does not match definition
At a function call, the number of arguments passed to the function (actual arguments) differs from the number of formal arguments declared in the function heading. To declare functions with variable argument lists, use an ellipsis (…) behind the last known argument in the function heading; for example: print(formatstring,…); (see page 78).
203 — symbol is never used: identifier
A symbol is defined but never used. Public functions are excluded from the symbol usage check (since these may be called from the outside).
204 — symbol is assigned a value that is never used: identifier
A value is assigned to a symbol, but the contents of the symbol are never accessed.
205 — redundant code: constant expression is zero
Where a conditional expression was expected, a constant expression with the value zero was found, e.g. “while (0)” or “if (0)”. The the conditional code below the test is never executed, and it is therefore redundant.
206 — redundant test: constant expression is non-zero
Where a conditional expression was expected, a constant expression with a non-zero value was found, e.g. if (1). The test is redundant, because the conditional code is always executed.
To create an endless loop, use for ( ;; ) instead of while (1).
207 — unknown “#pragma”
The compiler ignores the pragma. The #pragma directives may change between compilers of different vendors and between different versions of a compiler of the same version.
208 — function with tag result used before definition, forcing
reparse
When a function is “used” (invoked) before being declared, and that function returns a value with a tag name, the parser must make an extra pass over the source code, because the presence of the tag name may change the interpretation of operators (in the presence of user-defined operators). You can speed up the parsing/compilation process by declaring the relevant functions before using them.
209 — function should return a value
The function does not have a return statement, or it does not have an expression behind the return statement, but the function’s result is used in a expression.
210 — possible use of symbol before initialization: identifier
A local (uninitialized) variable appears to be read before a value is assigned to it. The compiler cannot determine the actual order of reading from and storing into variables and bases its assumption of the execution order on the physical appearance order of statements an expressions in the source file.
211 — possibly unintended assignment
Where a conditional expression was expected, the assignment operator (=) was found instead of the equality operator (==). As this is a frequent mistake, the compiler issues a warning. To avoid this message, put parentheses around the expression, e.g. if ( (a=2) ).
212 — possibly unintended bitwise operation
Where a conditional expression was expected, a bitwise operator (& or |) was found instead of a Boolean operator (&& or ||). In situations where a bitwise operation seems unlikely, the compiler issues this warning. To avoid this message, put parentheses around the expression.
213 — tag mismatch
A tag mismatch occurs when:
— assigning to a tagged variable a value that is untagged or that has a different tag
— the expressions on either side of a binary operator have different tags
— in a function call, passing an argument that is untagged or that has a different tag than what the function argument was defined with
— indexing an array which requires a tagged index with no tag or a wrong tag name
214 — possibly a “const” array argument was intended: identifier
Arrays are always passed by reference. If a function does not modify the array argument, however, the compiler can sometimes generate more compact and quicker code if the array argument is specifically marked as “const”.
215 — expression has no effect
The result of the expression is apparently not stored in a variable or used in a test. The expression or expression statement is therefore redundant.
216 — nested comment
pawn does not support nested comments.
217 — loose indentation
Statements at the same logical level do not start in the same column; that is, the indents of the statements are different. Although pawn is a free format language, loose indentation frequently hides a logical error in the control flow.
The compiler can also incorrectly assume loose indentation if the tab size with which you indented the source code differs from the assumed size. This may happen if the source files use a mixture of tab and space characters to indent lines. Sometimes it is then needed to tell the pawn parser what tab size to use, see #pragma tabsize on page 121 or the compiler option -t on page 170.
You can also disable this warning with #pragma tabsize 0 or the compiler option -t:0.
218 — old style prototypes used with optional semicolon
When using “optional semicolons”, it is preferred to explicitly declare forward functions with the forward keyword than using terminating semicolon.
219 — local variable identifier shadows a symbol at a preceding level
A local variable has the same name as a global variable, a function, a function argument, or a local variable at a lower precedence level. This is called “shadowing”, as the new local variable makes the previously defined function or variable inaccessible.
Note: if there are also error messages further on in the script about missing variables (with these same names) or brace level problems, it could well be that the shadowing warnings are due to these syntactical and semantical errors. Fix the errors first before looking at the shadowing warnings.
220 — expression with tag override must appear between paren- theses
In a case statement and in expressions in the conditional operator (“ ? : ”), any expression that has a tag override should be en- closed between parentheses, to avoid the colon to be misinterpreted as a separator of the case statement or as part of the conditional operator.
221 — label name identifier shadows tag name
A code label (for the goto instruction) has the same name as a previously defined tag. This may indicate a faultily applied tag override; a typical case is an attempt to apply a tag override on the variable on the left of the = operator in an assignment statement.
222 — number of digits exceeds rational number precision
A literal rational number has more decimals in its fractional part than the precision of a rational number supports. The remaining decimals are ignored.
223 — redundant “sizeof”: argument size is always 1 (symbol name)
A function argument has a as its default value the size of another argument of the same function. The “sizeof” default value is only useful when the size of the referred argument is unspecified in
the declaration of the function; i.e., if the referred argument is an array.
224 — indeterminate array size in “sizeof” expression (symbol name)
The operand of the sizeof operator is an array with an unspecified size. That is, the size of the variable cannot be determined
at compile time. If used in an “if” instruction, consider a conditionally compiled section, replacing if by #if.
225 — unreachable code
The indicated code will never run, because an instruction before (above) it causes a jump out of the function, out of a loop or elsewhere. Look for return, break, continue and goto instructions above the indicated line. Unreachable code can also be caused by an endless loop above the indicated line.
226 — a variable is assigned to itself (symbol name)
There is a statement like “x = x” in the code. The parser checks for self assignments after performing any text and constant substitutions, so the left and right sides of an assignment may appear to be different at first sight. For example, if the symbol “TWO” is a constant with the value 2, then “var[TWO] = var[2]” is also a self-assignment.
Self-assignments are, of course, redundant, and they may hide an error (assignment to the wrong variable, error in declaring constants).
Note that the pawn parser is limited to performing “static checks” only. In this case it means that it can only compare array assignments for self-assignment with constant array indices.
227 — more initiallers than array fields
An array that is declared with sumbolic subscripts contains more values/fields as initiallers than there are (symbolic) subscripts.
228 — length of initialler exceeds size of the array field
The initialler for an array element contains more values than the size of that field allows. This occurs in an array that has symbolic subscripts, and where a particular subscript is declared with a size.
229 — mixing packed and unpacked array indexing or array assignment
An array is declared as packed (with { and } braces) but indexed as unpacked (with [ and ]), or vice versa. Or one array is assigned to another and one is packed while the other is unpacked.
230 — no implementation for state name in function name, no fall-back
A function is lacking an implementation for the indicated state. The compiler cannot (statically) check whether the function will ever be called in that state, and therefore it issues this warning. When the function would be called for the state for which no implementation exists, the abstract machine aborts with a run time error.
See page 81 on how to specify a fall-back function, and page 42 for a description and an example.
231 — state specification on forward declaration is ignored
A state specification is redundant on forward declarations. The function signature must be equal for all states. Only the imple- mentations of the function are state-specific.
232 — native function lacks a predefined index (symbol name)
The pawn compiler was configured with predefined indices for native functions, but it encountered a declaration for which it does not have an index declaration. This usually means that the script uses include files that arenot appropriate for the active configuration.
233 — state variable name shadows a global variable
The state variable has the same name as a global variable (without state specifiers). This means that the global variable is inaccessible for a function with one of the same states as those of the variable.
234 — function is deprecated (symbol name)
The script uses a function which as marked as “deprecated”. The host application can mark (native) functions as deprecated when better alternatives for the function are available or if the function may not be supported in future versions of the host application.
235 — public function lacks forward declaration (symbol name)
The script defines a public function, but no forward declaration of this function is present. Possibly the function name was written incorrectly. The requirement for forward declarations of public functions guards against a common error.
236 — unknown parameter in substitution (incorrect #define pattern)
A #define pattern contains a parameter in the replacement (e.g. “%1”), that is not in the match pattern. See page 92 for the preprocessor syntax.
237 — recursive function name
The specified function calls itself recursively. Although this is valid in pawn, a self-call is often an error. Note that this warning is only generated when the pawn parser/compiler is set to “verbose” mode.
238 — mixing string formats in concatenation
In concatenating literals strings, strings with different formats (such as packed versus unpacked, and “plain” versus standard strings) were combined. This is usually an error. The parser uses the format of the first (left-most) string in the concatenation for the result.

Source — here you can also view notices which are described above.

__________________


⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.


Last edited by ShufflexDD; 11-16-2012 at 16:57.

Error 002: only a single statement

Модераторы: Subb98, liFe iS GoOD

  • Список форумов AMX Mod X Скриптинг

Правила форума
1. Запрещено материться и оскорблять других участников форума.
2. Запрещен флуд, оффтоп, дабл постинг во всех разделах форума, кроме раздела «Болтовня».
3. Запрещено взламывать сайт/форум или наносить любой вред проекту.
4. Запрещено рекламировать другие ресурсы.
5. Запрещено создавать темы без информативного названия. Название темы должно отображать ее смысл.

В данном разделе форума разрешено создавать темы, касающие только скриптинга для AMX Mod X.

Правила при создании новой темы:
1. При вставке кода плагина необходимо использовать тег [code=php].
2. Любые изображения должны быть загружены, как вложения к вашему сообщению.
3. При описании проблемы или запросе на помощь в редактировании плагина обязательно выкладывайте исходник sma плагина.

  • Ответить с цитатой

Error 002: only a single statement

Здравствуйте, форумчане.. Хотел попросить помощи.. Компилятор выдает ошибку

Строка: (2480) : error 002: only a single statement (or expression) can follow each «case»

Сам код паблика:

Код: Выделить всё
public lastrequest_select(idmenuitem)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_HANDLEDif(item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    static 

idst[32], data[5], accesscallbackoption[64]menu_item_getinfo(menuitemaccessdatacharsmax(data), dstcharsmax(dst), callback)
    
get_user_name(iddstcharsmax(dst))
    switch(
data[0])
    {
        case(
'1'):
        {
            
g_LastDenied 1
            cs_set_user_money
(idcs_get_user_money(id) + 8000)
            
user_silentkill(id)
        }
        case(
'2'):
        {
            
g_LastDenied 1
            formatex
(optioncharsmax(option), "w[JBR] %s спиздил у Охраны Оружие"dst)
            
player_hudmessage(063.0, {02550}, option)
            
g_Duel 2
            player_strip_weapons_all
()
            
random_num(0sizeof(_WeaponsFree) - 1)
            
give_item(id_WeaponsFree[i])
            
g_BlockWeapons 1
            cs_set_user_bpammo
(id_WeaponsFreeCSW[i], _WeaponsFreeAmmo[i])
        }
        case(
'3'):
        {
            
g_Duel 3
            menu_players
(idCS_TEAM_CT01"duel_knives""y[w!y] Выбери дуэлиста !")
        }
        default:
        {                 
            
g_Duel str_to_num(data)
            
menu_players(idCS_TEAM_CT01"duel_guns""y[w!y] Выбери дуэлиста !")
    }                     
    
menu_destroy(menu)   
    return 
PLUGIN_HANDLED
}  

В чем ошибка?

Аватара пользователя

Skilovy

 
Сообщения: 39
Зарегистрирован: 14 май 2014, 10:49
Откуда: Барнаул
Благодарил (а): 24 раз.
Поблагодарили: 9 раз.
Опыт программирования: Около года

  • Ответить с цитатой

Re: Error 002: only a single statement

Сообщение liFe iS GoOD » 23 мар 2016, 21:02

Код: Выделить всё
        default:
        {                 
            
g_Duel str_to_num(data)
            
menu_players(idCS_TEAM_CT01"duel_guns""y[w!y] Выбери дуэлиста !")
    }    

Скобку закрыть забыли ;)

Аватара пользователя

liFe iS GoOD

Модератор
 
Сообщения: 1416
Зарегистрирован: 24 май 2012, 19:48
Благодарил (а): 116 раз.
Поблагодарили: 472 раз.

  • Ответить с цитатой

Re: Error 002: only a single statement

Сообщение Skilovy » 23 мар 2016, 21:12

liFe iS GoOD писал(а):

Код: Выделить всё
        default:
        {                 
            g_Duel 
= str_to_num(data)
            menu_players(id, CS_TEAM_CT, 0, 1, "duel_guns", "y[w!y] Выбери дуэлиста !")
    }

Скобку закрыть забыли ;)

Благодарен :3
:thumbs_up

Аватара пользователя

Skilovy

 
Сообщения: 39
Зарегистрирован: 14 май 2014, 10:49
Откуда: Барнаул
Благодарил (а): 24 раз.
Поблагодарили: 9 раз.
Опыт программирования: Около года

  • Ответить с цитатой

Re: Error 002: only a single statement

Сообщение vrw23197vrw23197 » 23 мар 2016, 23:23

Можно и без скобок 

Код: Выделить всё

public lastrequest_select
(id, menu, item)
{
    if(!is_user_connected(id))
        return PLUGIN_HANDLED

        if

(item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    
}    static i, dst[32], data[5], access, callback, option[64]    menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
    get_user_name(id, dst, charsmax(dst))
    switch(data[0])
    {
        case('1'):
        {
            g_LastDenied = 1
            cs_set_user_money
(id, cs_get_user_money(id) + 8000)
            user_silentkill(id)
        }
        case('2'):
        {
            g_LastDenied = 1
            formatex
(option, charsmax(option), "w[JBR] %s спиздил у Охраны Оружие", dst)
            player_hudmessage(0, 6, 3.0, {0, 255, 0}, option)
            g_Duel = 2
            player_strip_weapons_all
()
            i = random_num(0, sizeof(_WeaponsFree) - 1)
            give_item(id, _WeaponsFree[i])
            g_BlockWeapons = 1
            cs_set_user_bpammo
(id, _WeaponsFreeCSW[i], _WeaponsFreeAmmo[i])
        }
        case('3'):
        {
            g_Duel = 3
            menu_players
(id, CS_TEAM_CT, 0, 1, "duel_knives", "y[w!y] Выбери дуэлиста !")
        }
        default:g_Duel = str_to_num(data),menu_players(id, CS_TEAM_CT, 0, 1, "duel_guns", "y[w!y] Выбери дуэлиста !");
    }                     
    menu_destroy
(menu)   
    return PLUGIN_HANDLED
}

Аватара пользователя

vrw23197vrw23197

 
Сообщения: 15
Зарегистрирован: 23 мар 2016, 23:15
Забанен
Благодарил (а): 0 раз.
Поблагодарили: 3 раз.
Языки программирования: Counter-Strike 1.6
Counter-Strike: Source
Team Fortress II
Left 4 Dead


Вернуться в Скриптинг

Кто сейчас на конференции

Сейчас этот форум просматривают: Google [Bot] и гости: 2

Аватар для Дмитрий

Регистрация: 03.12.2011
Страна: Российская Федерация
Репутация:  14
Сообщений:  1421
Награды:

4
+

Статус:

Уверен вам пригодится

[Waring]
%s- переменная

Переменная — это хранилище данных, куда мы можем записывать
различные данные для их последующего вызова. Тоесть действия с переменными предельно просты: запись информации,вывод и
использование информации. Если присмотрется ближе, то список можно пополнить еще одним пунктом — объявление переменной.
Каждая переменная имеет свое название, чтобы компилятор мог отличить друг от друга переменные, название мы задаем при
объявлении. Оператор объявления переменной — new

1)
PHP код:

Code

warning 219: local variable «%s» shadows a variable at a preceding level  

Это значит что переменная дважды объявлена.
Пример:
PHP код:

;
Что же нам делать, а вот что:
1) мы можем одну из них удалить;
2) можем изменить;

Но не стоит забывать что при изменении переменной нам нужно заменить все что её касается
вот пример правильного изменения:
PHP код:

Code

new neka1;
      neka1 = CreatePickup(1239, 2, 1380.3220,-1771.3235,13.5469);

2)
PHP код:

Code

warning 217: loose indentation

Это значит что код не табулирован(код не построен лесенкой)
Пример:

PHP код:

Code

stock LSNews(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(!lNews[i]){
SendClientMessage(i, color, string);}}}}

пример правильного табулирования

Code

stock LSNews(color,const string[])
{
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
          if(IsPlayerConnected(i))
          {
              if(!lNews[i])
              {
                  SendClientMessage(i, color, string);
              }
          }
      }
}  

Что же делать? ответ прост
1) мы можем делать все вручную
2) можем поставить

3) можем с помощи notepad++ все исправить (на форуме есть урок)

pragma tabsize — Он просто маскирует эти warning и не более

3)

Code

warning 235: public function lacks forward declaration %s

Это означает что у функции нету forward
Пример:
Вы создали паблик

И увас появляется этот варинг что же делать?
ответ прост
добавляем forward

Code

forward lol();
public lol()

если вы не хотите каждый раз писать forward то можно сделать так:

Code

#define public:%1(%2) forward %1(%2);
public %1(%2)

и тогда новые паблики мы пишем так

4)

Code

warning 216: nested comment ;

Вот так это выглядит

Code

/*case 458: //Fire&lvl    
исправление   
PHP код:
case 458: //Fire&lvl

5)

Code

warning 213: tag mismatch

Это означает не совпадения аргументов
вот допустим самый простой случай:

Code

#define CreateObject CreateDynamicObject
#define MoveObject MoveDynamicObject

решение простое

Code

#define CreateObject, CreateDynamicObject
#define MoveObject,  MoveDynamicObject  

6)

Code

warning 201: redefinition of constant/macro

Это означает что в дефайнах(define)
Пример:

Code

#define OnPlayerEnterRaceCheckpoint
#define OnPlayerEnterRaceCheckpoint

Решение одну из двух удалить!
7)

Code

warning 200: symbol «%s» is truncated to 31 characters

Это обозначает что мы при создании переменной ввели больше 31 символа
Пример:

Code

new sssssssssssssssssssssssssssssss;

Решение:
Просто сменить название или укоротить !
8)

Code

warning 202: number of arguments does not match definition

Это значит что у нас не совпадают аргументы
Возьмем самый простой пример:

Code

Create3DTextLabel(» ТУт типо текст .»,0xFFA500FF,.0120,456.2717,35.1719,20.0);

Наша ошибка содержится здесь:

Code

-2041.0120,456.2717,35.1719,20.0    
-2041.0120,456.2717,35.1719——— это на ша координата (она нас не интересует)
20.0———вот наша ошибка (20—-это расстояние с которого наш текст будет виден)
а вот 0 это у нас testLOS- линия видимости

решение простое:
Нам 0 нужно заменить на 1

Code

Create3DTextLabel(» ТУт типо текст .»,0xFFA500FF,1111.1111,111.1111,11.1111,20.1);

9)

Code

warning 203: symbol is never used: %s

Это означает что данный символ нигде не используется
Пример :
Создадим допустим переменную

И тут у нас возникает

Code

(1578) warning 203: symbol is never used: «respon»

Что же делать?
Ответ прост:
найти эту переменную и удалить

10)

Code

warning 204: symbol is assigned a value that is never used %s

Это значит что создали переменную и массив а он негде не используется
Пример:

Решения: просто удалить

11)

Code

warning 209: function «%s» should return a value

Это значит что наша функция не возвращается(простыми словами нету return 1; или return 0
пример:

Code

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)   
{   
     if (newkeys == 1024)   
     {   
     OnPlayerCommandText(playerid,»/Blablabal»);   
     return 1; <========Вот наш return  ДО
     }   
}  

Решения:

Code

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     if (newkeys == 1024)
     {
     OnPlayerCommandText(playerid,»/Blablabal»);
     }
     return 1; <========Вот наш return ПОСЛЕ
}  

[Error]

1)

Code

error 040: duplicate «case» label (value 28)

это означает что case стаким значением повторяется
Решение этой проблемы простое

нам нужно цифру 28 изменит на другую (в той строчке на которую жалуется )
2)

Code

error 032: array index out of bounds (variable «JoinPed»)

Это означает что индекс массива превышен (но не всегда смотрим дальше)
Пример:

Code

new JoinPed[131][1] = {

131- массив поигравшись с ним я понял что дело не в нем, а в чём-же спросите вы?
пример данной ошибки:

Code

else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[98][0]; }

как видим
JoinPed[123] с начало с таким значением, а потом JoinPed[98]
Решение простое:
JoinPed[123] число в данных скобках должно быть одинаковым.
пример:

Code

else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[123][0]; }

3)

Code

error 037: invalid string (possibly non-terminated string)

Это означает что строка неправильная а точнее где то допущена ошибка
пример:

Code

else if(PlayerInfo[targetid][pRank] == 4) { rangz = «Зам.модера; }

как видим нам после слова «модера» не хватает »
пример:

Code

else if(PlayerInfo[targetid][pRank] == 4) { rangz = «Зам.модера»; }

4)

Code

error 001: expected token: «,», but found «;»

Это значит что мы пропустили знак или скобку (в данном примере скобку)
Пример:

Code

public SaveProdykts()
{
      new idx;
      new File: file2;
      while (idx < sizeof(ProdyktsInfo))
      {
          new coordsstring[256];
          format(coordsstring, sizeof(coordsstring), «%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%dn»,
          ProdyktsInfo[idx][prSous],
          ProdyktsInfo[idx][prPizza],
          ProdyktsInfo[idx][prMilk],
          ProdyktsInfo[idx][prJuice],
          ProdyktsInfo[idx][prSpirt],
          ProdyktsInfo[idx][prChicken],
          ProdyktsInfo[idx][prKolbasa],
          ProdyktsInfo[idx][prFish],
          ProdyktsInfo[idx][prIceCream],
          ProdyktsInfo[idx][prChips],
          ProdyktsInfo[idx][prZamProd];
          if(idx == 0)
          {
              file2 = fopen(«[prodykts]/prodykts.cfg», io_write);
          }
          else
          {
              file2 = fopen(«[prodykts]/prodykts.cfg», io_append);
          }
          fwrite(file2, coordsstring);
          idx++;
          fclose(file2);
      }
      return 1;
}  

смотрим на

Code

ProdyktsInfo[idx][prZamProd];

и вим что мы пропустили )
и так оно выглядит

Code

ProdyktsInfo[idx][prZamProd]);

Code

public SaveProdykts()
{
      new idx;
      new File: file2;
      while (idx < sizeof(ProdyktsInfo))
      {
          new coordsstring[256];
          format(coordsstring, sizeof(coordsstring), «%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%dn»,
          ProdyktsInfo[idx][prSous],
          ProdyktsInfo[idx][prPizza],
          ProdyktsInfo[idx][prMilk],
          ProdyktsInfo[idx][prJuice],
          ProdyktsInfo[idx][prSpirt],
          ProdyktsInfo[idx][prChicken],
          ProdyktsInfo[idx][prKolbasa],
          ProdyktsInfo[idx][prFish],
          ProdyktsInfo[idx][prIceCream],
          ProdyktsInfo[idx][prChips],
          ProdyktsInfo[idx][prZamProd]);< ———— И вот наша скобка   
          if(idx == 0)
          {
              file2 = fopen(«[prodykts]/prodykts.cfg», io_write);
          }
          else
          {
              file2 = fopen(«[prodykts]/prodykts.cfg», io_append);
          }
          fwrite(file2, coordsstring);
          idx++;
          fclose(file2);
      }
      return 1;
}  

5)

Code

error 002: only a single statement (or expression) can follow each «case»

Это означает что у вас после «case» идет if(dialogid == )
Пример:

Code

case 7507:   
      {   
          if(response) ClothesSex[playerid] = 1;   
          else ClothesSex[playerid] = 2;   
          ShowPlayerDialog(playerid,7504,2,»??????? ??????»,»{A0B0D0}?????????? ?????? {7CC000}300$n{A0B0D0}??????? ?????? {7CC000}300$n{A0B0D0}???????????? ?????? {7CC000}300$n{A0B0D0}?????»,»???????»,»?????»);   
          return 1;   
      }   
if(dialogid == 7504)  <——————- вот наша и ошибка   
      {   
          if(response)   
          {   
                SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1);   
                SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);   
                ClothesRun[playerid] = 0;   
              return 1;   
          }  

Решение простое:
if(dialogid == 7504) это нам нужно заменить на case как и последующий диалог !

Code

case 7504:  <——————- вот так это выглядит
      {   
          if(response)   
          {   
                SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1);   
                SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);   
                ClothesRun[playerid] = 0;   
              return 1;   
          }  

6)

Code

error 004: function «%s» is not implemented

Это означает что мы пропустили скобку.
Мой совет
1)проверить весь код в ручную
2)на форуме был урок как найти не по ставленую скобку
3)Можно воспользоватся notepad++ там показы линии открытых скобок и тогда можно найти эту скобку

7)

Code

error 017: undefined symbol %s

Это означает что мы не поставили переменную (new)
Пример:

Code

error 017: undefined symbol «lol»

Решение:
Ко всем new добавим

Автор:shreson


From Russia With Love!

Автор: minimiller
Перевод и редактирование: DJ_WEST

Список ошибок:

CODE

/*001*/ «expected token: «%s», but found «%s»n»,
/*002*/ «only a single statement (or expression) can follow each «case»n»,
/*003*/ «declaration of a local variable must appear in a compound blockn»,
/*004*/ «function «%s» is not implementedn»,
/*005*/ «function may not have argumentsn»,
/*006*/ «must be assigned to an arrayn»,
/*007*/ «operator cannot be redefinedn»,
/*008*/ «must be a constant expression; assumed zeron»,
/*009*/ «invalid array size (negative or zero)n»,
/*010*/ «invalid function or declarationn»,
/*011*/ «invalid outside functionsn»,
/*012*/ «invalid function call, not a valid addressn»,
/*013*/ «no entry point (no public functions)n»,
/*014*/ «invalid statement; not in switchn»,
/*015*/ «»default» case must be the last case in switch statementn»,
/*016*/ «multiple defaults in «switch»n»,
/*017*/ «undefined symbol «%s»n»,
/*018*/ «initialization data exceeds declared sizen»,
/*019*/ «not a label: «%s»n»,
/*020*/ «invalid symbol name «%s»n»,
/*021*/ «symbol already defined: «%s»n»,
/*022*/ «must be lvalue (non-constant)n»,
/*023*/ «array assignment must be simple assignmentn»,
/*024*/ «»break» or «continue» is out of contextn»,
/*025*/ «function heading differs from prototypen»,
/*026*/ «no matching «#if…»n»,
/*027*/ «invalid character constantn»,
/*028*/ «invalid subscript (not an array or too many subscripts): «%s»n»,
/*029*/ «invalid expression, assumed zeron»,
/*030*/ «compound statement not closed at the end of filen»,
/*031*/ «unknown directiven»,
/*032*/ «array index out of bounds (variable «%s»)n»,
/*033*/ «array must be indexed (variable «%s»)n»,
/*034*/ «argument does not have a default value (argument %d)n»,
/*035*/ «argument type mismatch (argument %d)n»,
/*036*/ «empty statementn»,
/*037*/ «invalid string (possibly non-terminated string)n»,
/*038*/ «extra characters on linen»,
/*039*/ «constant symbol has no sizen»,
/*040*/ «duplicate «case» label (value %d)n»,
/*041*/ «invalid ellipsis, array size is not knownn»,
/*042*/ «invalid combination of class specifiersn»,
/*043*/ «character constant exceeds range for packed stringn»,
/*044*/ «positional parameters must precede all named parametersn»,
/*045*/ «too many function argumentsn»,
/*046*/ «unknown array size (variable «%s»)n»,
/*047*/ «array sizes do not match, or destination array is too smalln»,
/*048*/ «array dimensions do not matchn»,
/*049*/ «invalid line continuationn»,
/*050*/ «invalid rangen»,
/*051*/ «invalid subscript, use «[ ]» operators on major dimensionsn»,
/*052*/ «multi-dimensional arrays must be fully initializedn»,
/*053*/ «exceeding maximum number of dimensionsn»,
/*054*/ «unmatched closing bracen»,
/*055*/ «start of function body without function headern»,
/*056*/ «arrays, local variables and function arguments cannot be public (variable «%s»)n»,
/*057*/ «unfinished expression before compiler directiven»,
/*058*/ «duplicate argument; same argument is passed twicen»,
/*059*/ «function argument may not have a default value (variable «%s»)n»,
/*060*/ «multiple «#else» directives between «#if … #endif»n»,
/*061*/ «»#elseif» directive follows an «#else» directiven»,
/*062*/ «number of operands does not fit the operatorn»,
/*063*/ «function result tag of operator «%s» must be «%s»n»,
/*064*/ «cannot change predefined operatorsn»,
/*065*/ «function argument may only have a single tag (argument %d)n»,
/*066*/ «function argument may not be a reference argument or an array (argument «%s»)n»,
/*067*/ «variable cannot be both a reference and an array (variable «%s»)n»,
/*068*/ «invalid rational number precision in #pragman»,
/*069*/ «rational number format already definedn»,
/*070*/ «rational number support was not enabledn»,
/*071*/ «user-defined operator must be declared before use (function «%s»)n»,
/*072*/ «»sizeof» operator is invalid on «function» symbolsn»,
/*073*/ «function argument must be an array (argument «%s»)n»,
/*074*/ «#define pattern must start with an alphabetic charactern»,
/*075*/ «input line too long (after substitutions)n»,
/*076*/ «syntax error in the expression, or invalid function calln»,
/*077*/ «malformed UTF-8 encoding, or corrupted file: %sn»,
/*078*/ «function uses both «return» and «return <value>»n»,
/*079*/ «inconsistent return types (array & non-array)n»,
/*080*/ «unknown symbol, or not a constant symbol (symbol «%s»)n»,
/*081*/ «cannot take a tag as a default value for an indexed array parameter (symbol «%s»)n»,
/*082*/ «user-defined operators and native functions may not have statesn»,
/*083*/ «a function may only belong to a single automaton (symbol «%s»)n»,
/*084*/ «state conflict: one of the states is already assigned to another implementation (symbol «%s»)n»,
/*085*/ «no states are defined for function «%s»n»,
/*086*/ «unknown automaton «%s»n»,
/*087*/ «unknown state «%s» for automaton «%s»n»,
/*088*/ «number of arguments does not match definitionn»

Разбор ошибок
Рассмотрим пример нахождения и самостоятельного решения ошибок при компиляции.
Допустим у нас есть ошибка:

Цитата

C:AMXXexample.sma(107) : error 035: argument type mismatch (argument 2)

Теперь давайте попытаемся разобрать эту ошибку по частям:
1) C:AMXXexample.sma — это директория, где находится исходник (.sma) нашего плагина.
2) (107) — это номер строки, в которой есть ошибка. Большинство современных редакторов текста имеют панель с пронумерованными строками (Notepad++, AMXX-Studio и другие).
3) error 035 — это код ошибки (список ошибок указан выше).
4) argument type mismatch — это описание ошибки с кодом, указанным до этого. В данном случае нам говорится, что «аргумент имеет неверный тип».
5) (argument 2) — это более подробное описание ошибки. В данном случае нам указывается, что ошибка во 2 аргументе.

Итого, получаем: в файле example.sma, который находится в директории C:AMXX, в строке под номером 107 есть ошибка с кодом 035, которая означает, что аргумент 2 имеет неверный тип данных.

Решение ошибок
Теперь попытаемся исправить нашу ошибку. Идем в строку под номером 107 и видим следующий код:

Код

client_print(0, «Welcome to the server!»)

Идем на http://www.amxmodx.org/funcwiki.php?go=func&id=22 и читаем описание функции:

Цитата

client_print — Sends a message to a player.

Syntax:
client_print ( index, type, const message[], … )

id is a player index from 1 to 32. If 0, the message will be sent to all players.

The type is one of three types:
print_chat — chat text
print_console — console message
print_notify — console in dev mode
print_center — center say

Смотрим синтаксис команды client_print и видим, что первый аргумент index — это номер игрока (id), который может быть от 1 до 32, если же он 0, то сообщение будет отсылаться всем игрокам на сервере. Второй аргумент type — это тип сообщения, который может быть:

Цитата

print_chat — текст в чат
print_console — текст в консоль
print_notify — текст в консоль в режиме разработчика
print_center — текст по центру

Третий аргумент message — это и есть текст нашего сообщения. Теперь вернемся, к нашему, коду. Мы видим, что у нас нет второго аргумента (тип сообщения), а сразу идет текст сообщения, исправляем на:

Код

client_print(0, print_center, «Welcome to the server!»)

Теперь компиляция прошла успешно.

Описание ошибок:

error 001: expected token: «X», but found «Y»

Ошибка означает, что не найден X, когда найден Y. Наиболее часто возникает, когда забывают поставить недостающие знаки ; { } ( ).
Пример ошибки:

Код

public Function(id)
{
    if (is_user_bot(id)
    return PLUGIN_HANDLED

        // код

        return PLUGIN_CONTINUE
}

error 017: undefined symbol «X»

Ошибка означает, что X — неизвестный сивол/команда/переменная/функция. Поэтому такую функцию или переменную нужно объявить перед использованием. Например, функция is_user_hacker не существует.
Пример ошибки:

Код

public Function(id)
{
    if (is_user_hacker(id))
    return PLUGIN_HANDLED

        // код

        return PLUGIN_CONTINUE
}

error 032: array index out of bounds (variable X)

Ошибка означает, что в мы вышли за предел размера массива X.
Пример ошибки:

Код

new s_Name[32]
s_Name[33] = «*»

error 033: array must be indexed (variable X)

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

Код

new s_String = «My string»

error 035: argument type mismatch (argument X)

Ошибка означает, что аргумент X имеет неверный тип данных. Например, когда вместо целочисленного аргумента передаем строку.
Пример ошибки:

Код

public Function1(id)
{
    Function2(id, «10»)
}

public Function2(id, count)
{
    // код
}

error 040: duplicate «case» label (value X)

Ошибка означает, что имеется дубль оператора case со значением X.
Пример ошибки:

Код

public Function(id)
{
    switch(count)
    {
        case 1: count += 1
    case 2: count += 2
    case 2: count += 3
    }
}

error 075: input line too long (after substitutions)

Ошибка означает, что указанная строка слишком длинная. Например, около 500 символов.
Пример ошибки:

Код

public Function(id)
{
    server_print(«AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A
AAAAAAAAAAAAAAAAAAA»)
}

error 078: function uses both «return» and «return <value>»

Ошибка означает, что функция использует, как return, так и return <значение>.
Пример ошибки:

Код

public Function(id)
{
    if (is_user_alive(id))    
        return

        return PLUGIN_HANDLED
}

error 088: number of arguments does not match definition

Ошибка означает, что количество переданных аргументов не соответсвует количеству объявленных аргументов.
Пример ошибки:

Код

public Function1(id)
{
    Function2(id)
}

public Function2(id, count)
{
    // код
}

Источник: http://amx-x.ru

error 001 expected token: «%s», but found «%s» ожидался символ: «%s», но был найден «%s» error 002 only a single statement (or expression) can follow each «case» только одно заявление (или выражение) могут следовать за «case» error 003 declaration of a local variable must appear in a compound block объявленная локальная переменная должна использоваться в этом же блоке error 004 function «%s» is not implemented функция %s не реализована error 005 function may not have arguments функция не имеет аргументов error 006 must be assigned to an array должен быть присвоен массив error 007 operator cannot be redefined оператор не может быть установлен еще раз error 008 must be a constant expression; assumed zero должно быть постоянным выражением; равным нулю error 009 invalid array size (negative or zero) неверный размер массива (отрицательный или 0) error 010 invalid function or declaration неизвестная функция или декларация error 011 invalid outside functions неверно вне функции error 012 invalid function call, not a valid address неверный вызов функции, неверный адрес error 013 no entry point (no public functions) нет точки входа (не public функция) error 014 invalid statement; not in switch неверный оператор; не в switch error 015 default case must be the last case in switch statement default должен быть последним условием в switch error 016 multiple defaults in «switch» несколько «default» в switch error 017 undefined symbol «%s» неизвестный символ «%s» error 018 initialization data exceeds declared size данные массива превышают его размер error 019 not a label: «%s» не метка «%s» error 020 invalid symbol name «%s» неверное имя символа «%s» error 021 symbol already defined: «%s» символ уже объявлен: «%s» error 022 must be lvalue (non-constant) должно быть левосторонним (нет постоянной) error 023 array assignment must be simple assignment назначение массива должно быть простым error 024 break or «continue» is out of context break или «continue» вне контекста error 025 function heading differs from prototype функция заголовка отличается от прототипа error 026 no matching «#if…» не найдено «#if…» error 027 invalid character constant недопустимый символ в постоянной error 028 invalid subscript (not an array or too many subscripts): «%s» неверный индекс (это не массив или слишком много индексов): «%s» error 029 invalid expression, assumed zero неверное выражение, нет результата error 030 compound statement not closed at the end of file составной оператор не закрыт в конце файла error 031 unknown directive неизвестная директива error 032 array index out of bounds (variable «%s») индекс массива превышен error 033 array must be indexed (variable «%s») массив должен быть проиндексирован error 034 argument does not have a default value (argument %d) аргумент не имеет начального значения (аргумент %d) error 035 argument type mismatch (argument %d) несоответствие типа аргумента (аргумент %d) error 036 empty statement пустой оператор error 037 invalid string (possibly non-terminated string) неправильная строка error 038 extra characters on line лишние символы в строке error 039 constant symbol has no size символьная константа не имеет размера error 040 duplicate «case» label (value %d) несколько раз объявлен «case» с одним тем же параметром error 041 invalid ellipsis, array size is not known размер массива неизвестен error 042 invalid combination of class specifiers недопустимое сочетание класса error 043 character constant exceeds range for packed string символьная константа превышает размер строки error 044 positional parameters must precede all named parameters позиционные параметры должны предшествовать всем именованным параметрам error 045 too many function arguments слишком много аргументов у функции error 046 unknown array size (variable «%s») неизвестный размер массива error 047 array sizes do not match, or destination array is too small размеры массива конфликтуют, либо целевой массив слишком маленький error 048 array dimensions do not match размеры массива не совпадают error 049 invalid line continuation неправильное продолжение строки error 050 invalid range неверный диапазон error 051 invalid subscript, use «[ ]» operators on major dimensions неправильный индекс, используйте «[]» error 052 multi-dimensional arrays must be fully initialized много-размерные массивы должны быть полностью определены error 053 exceeding maximum number of dimensions превышение максимального числа измерений error 054 unmatched closing brace не найдена закрывающаяся скобка error 055 start of function body without function header начало функции без заголовка error 056 arrays, local variables and function arguments cannot be public (variable «%s») массивы, локальные переменные и аргументы функции не могут быть общедоступными (переменная «% s») error 057 unfinished expression before compiler directive который недействителен. error 058 duplicate argument; same argument is passed twice дублирование аргумента; аргумент передается несколько раз error 059 function argument may not have a default value (variable «%s») аргумент не может иметь значение по-умолчанию error 060 multiple «#else» directives between «#if … #endif» несколько «#else» между «#if и #endif» error 061 #elseif directive follows an «#else» directive #else перед «#elseif» error 062 number of operands does not fit the operator Количество операторов не соотвествует оператору error 063 function result tag of operator «%s» must be «%s» Результат функции %s должен быть %s error 064 cannot change predefined operators невозможно изменить уже определенные операторы error 065 function argument may only have a single tag (argument %d) в этой функции может быть только один аргумент error 066 function argument may not be a reference argument or an array (argument «%s») аргумент функции не может быть ссылкой или массивом error 067 variable cannot be both a reference and an array (variable «%s») Переменная не может быть как массив или ссылка error 068 invalid rational number precision in #pragma неверное число в #pragma error 069 rational number format already defined формат рационального числа уже определен error 070 rational number support was not enabled рациональное число не поддерживается error 071 user-defined operator must be declared before use (function «%s») объявленный оператор должен быть перед использованием error 072 sizeof operator is invalid on «function» symbols оператор «sizeof» не может быть использован для символов функции error 073 function argument must be an array (argument «%s») аргумент %s должен быть массивом error 074 #define pattern must start with an alphabetic character #define должен начинаться с буквы error 075 input line too long (after substitutions) введенная строка слишком длинная error 076 syntax error in the expression, or invalid function call неправильный синтаксис или неправильный вызов функции error 077 malformed UTF-8 encoding, or corrupted file: %s плохая кодировка UTF-8 или плохой файл: %s error 078 «»}»>function uses both «return» and «return <value>» «»}»>функция использует «return» и «return <значение>» error 079 inconsistent return types (array & non-array) несовместимость типов возвращенных результатов error 080 unknown symbol, or not a constant symbol (symbol «%s») неизвестный или непостоянный символ: %s error 081 cannot take a tag as a default value for an indexed array parameter (symbol «%s») Нельзя взять значение в массив %s error 082 user-defined operators and native functions may not have states созданные функции или операторы не имеют состояния error 083 a function may only belong to a single automaton (symbol «%s») функция может принадлежать только к одной автоматизации error 084 state conflict: one of the states is already assigned to another implementation (symbol «%s») для функции %s уже определенна данная state error 085 no states are defined for function «%s» нет состояний, определенных для функции «%s» error 086 unknown automaton «%s» неизвестная автоматизация «%s» error 087 unknown state «%s» for automaton «%s» неизвестное состояние «%s» в автоматизации «%s» error 088 number of arguments does not match definitionn количество аргументов не совпадает с объявленными в функции

Всем привет, помогите исправить
(2526) : warning 215: expression has no effect
(2675) : warning 215: expression has no effect
(2797) : warning 215: expression has no effect
(2816) : warning 215: expression has no effect
(2829) : warning 215: expression has no effect
Строки
CMD:makeleader(playerid,params[])
{
Player[playerid][pLogged] == 1; (2526 строка)
if(Player[playerid][pAdmin] < 5) return true;
if(sscanf(params, «ud», params[0], params[1])) return SendClientMessage(playerid, -1, «{FFFFFF} Используйте: /makeleader [playerid] [member 0-8]»);
new string[145];
switch(params[1])
{

CMD:invite(playerid,params[])
{
Player[playerid][pLogged] == 1; (2675 строка)
if(sscanf(params, «ud», params[0])) return SendClientMessage(playerid, -1, «{FFFFFF} Èñïîëüçóéòå: /invite [playerid]»);
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,-1,»{FFFFFF} Èãðîêà íåò â ñåòè»);
if(Player[playerid][pLeader] == 0) return SendClientMessage(playerid,-1,»{FFFFFF} Âû íå ëèäåð îðãàíèçàöèè»);
if(Player[params[0]][pMember] != 0) return SendClientMessage(playerid,-1,»{FFFFFF} Èãðîê óæå ñîñòîèò â îðãàíèçàöèè»);
Player[params[0]][pMember] = Player[playerid][pMember];
new string[145];
switch(Player[params[0]][pMember])
{

CMD:uninvite(playerid,params[])
{
Player[playerid][pLogged] == 1; (2797 строка)
if(sscanf(params, «u», params[0])) return SendClientMessage(playerid, -1, «{FFFFFF} Используйте: /uninvite [playerid]»);
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,-1,»{{FFFFFF} Игрока нет в сети»);
if(Player[playerid][pLeader] == 0) return SendClientMessage(playerid,-1,»{FFFFFF} Вы не лидер организации»);
if(params[0] == playerid) return SendClientMessage(playerid,-1,»{FFFFFF} Вы не можете уволить самого себя»);
if(Player[params[0]][pMember] != Player[playerid][pMember]) return SendClientMessage(playerid,-1,»{ff0000}[X]{FFFFFF} Игрок не состоит в вашей организации»);

Player[params[0]][pMember] = 0;
Player[params[0]][pLeader] = 0;
Player[params[0]][pRang] = 0;
Player[params[0]][pMemberSkin] = 0;
SpawnPlayer(params[0]);
new string[145];
SendClientMessage(params[0],COLOR_SERVER,»Вы были уволены из организации.»);
format(string, sizeof(string),»Вы уволили %s из своей организации.», GN(params[0]));SendClientMessage(playerid,COLOR_SERVER,string);
return true;
}

CMD:slap(playerid,params[])
{
Player[playerid][pLogged] == 1; (2816 строка)
if(Player[playerid][pAdmin] < 2) return true;
if(sscanf(params, «u»,params[0])) return SendClientMessage(playerid,-1, «{FFFFFF} Введите: /slap [id]»);
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,-1,»{FFFFFF} Игрока нет в сети»);
new string[145];
new Float:x, Float:y, Float:z;
GetPlayerPos(params[0],x,y,z);
SetPlayerPos(params[0],x,y,z+10);
SendClientMessage(playerid,-1, string);
return true;
}

CMD:spec(playerid,params[])
{
Player[playerid][pLogged] == 1; (2829 строка)
if(Player[playerid][pAdmin] < 1) return true;
if(sscanf(params,»u»,params[0]))return SendClientMessage(playerid,-1,»{FFFFFF} Введите: /spec [id]»);
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,-1,»{FFFFFF} Игрока нет в сети»);
if(params[0] == playerid) return
SendClientMessage(playerid,COLOR_ORANGE,»Для завершения режима наблюдения нажмите ESC»);
SpecPlayerID[playerid] = params[0];
AS[playerid] = true;
clicktd[playerid] = true;
TextDrawShowForPlayer(playerid, AdminSystem[0]);
TextDrawShowForPlayer(playerid, AdminSystem[1]);
TextDrawShowForPlayer(playerid, AdminSystem[2]);
TextDrawShowForPlayer(playerid, AdminSystem[3]);
TextDrawShowForPlayer(playerid, AdminSystem[4]);
TextDrawShowForPlayer(playerid, AdminSystem[5]);
TextDrawShowForPlayer(playerid, AdminSystem[6]);
TextDrawShowForPlayer(playerid, AdminSystem[7]);
TextDrawShowForPlayer(playerid, AdminSystem[8]);
TextDrawShowForPlayer(playerid, AdminSystem[9]);
TextDrawShowForPlayer(playerid, AdminSystem[10]);
TextDrawShowForPlayer(playerid, AdminSystem[11]);
TextDrawShowForPlayer(playerid, AdminSystem[12]);
TextDrawShowForPlayer(playerid, AdminSystem[13]);
TextDrawShowForPlayer(playerid, AdminSystem[14]);
TextDrawShowForPlayer(playerid, AdminSystem[15]);
TextDrawShowForPlayer(playerid, AdminSystem[16]);
TextDrawShowForPlayer(playerid, AdminSystem[17]);
TextDrawShowForPlayer(playerid, AdminSystem[18]);
SelectTextDraw(playerid, 0xA3B4C5FF);

new inter, world, Float:X, Float:Y, Float:Z, Float:FA;
if(GetPVarInt(playerid, «SpecBool») == 0)
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, FA);
inter = GetPlayerInterior(playerid);
world = GetPlayerVirtualWorld(playerid);
}
SetPlayerInterior(playerid,GetPlayerInterior(params[0]));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(params[0]));
TogglePlayerSpectating(playerid,true);
if(IsPlayerInAnyVehicle(params[0]))
{
new carid = GetPlayerVehicleID(params[0]);
PlayerSpectateVehicle(playerid, carid);
}
else PlayerSpectatePlayer(playerid,params[0]);
if(GetPVarInt(playerid, «SpecBool») == 0)
{
SetPVarInt(playerid, «SpecBool», 1);
SetPVarFloat(playerid, «SpecX», X);
SetPVarFloat(playerid, «SpecY», Y);
SetPVarFloat(playerid, «SpecZ», Z);
SetPVarFloat(playerid, «SpecFA», FA);
SetPVarInt(playerid, «SpecInt», inter);
SetPVarInt(playerid, «SpecWorld», world);
}
return true;
}

Понравилась статья? Поделить с друзьями:
  • Warning 1027 nemesis как исправить
  • Warn unexpected idcode 0x2ba01477 error expected 1 of 1 0x1ba01477
  • Warn generationtarget encountered exception accepting command error executing ddl
  • Warmos qx ошибка pl как исправить
  • Warmos qx ошибка fl что делать