Уверен вам пригодится
[Waring]
%s- переменная
Переменная — это хранилище данных, куда мы можем записывать
различные данные для их последующего вызова. Тоесть действия с переменными предельно просты: запись информации,вывод и
использование информации. Если присмотрется ближе, то список можно пополнить еще одним пунктом — объявление переменной.
Каждая переменная имеет свое название, чтобы компилятор мог отличить друг от друга переменные, название мы задаем при
объявлении. Оператор объявления переменной — new
1)
PHP код:
warning 219: local variable "%s" shadows a variable at a preceding level
Это значит что переменная дважды объявлена.
Пример:
PHP код:
new neka; new neka
;
Что же нам делать, а вот что:
1) мы можем одну из них удалить;
2) можем изменить;
Но не стоит забывать что при изменении переменной нам нужно заменить все что её касается
вот пример правильного изменения:
PHP код:
new neka1; neka1 = CreatePickup(1239, 2, 1380.3220,-1771.3235,13.5469);
2)
PHP код:
warning 217: loose indentation
Это значит что код не табулирован(код не построен лесенкой)
Пример:
PHP код:
stock LSNews(color,const string[]) { for(new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)){ if(!lNews[i]){ SendClientMessage(i, color, string);}}}}
пример правильного табулирования
PHP код:
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) можем поставить
#pragma tabsize 0
3) можем с помощи notepad++ все исправить (на форуме есть урок)
pragma tabsize — Он просто маскирует эти warning и не более
3)
PHP код:
warning 235: public function lacks forward declaration %s
Это означает что у функции нету forward
Пример:
Вы создали паблик
PHP код:
public lol()
И увас появляется этот варинг что же делать?
ответ прост
добавляем forward
PHP код:
forward lol(); public lol()
если вы не хотите каждый раз писать forward то можно сделать так:
PHP код:
#define public:%1(%2) forward %1(%2); public %1(%2)
и тогда новые паблики мы пишем так
PHP код:
public:lol()
4)
PHP код:
warning 216: nested comment ;
Вот так это выглядит
PHP код:
/*case 458: //Fire&lvl исправление PHP код: case 458: //Fire&lvl
5)
PHP код:
warning 213: tag mismatch
Это означает не совпадения аргументов
вот допустим самый простой случай:
PHP код:
#define CreateObject CreateDynamicObject #define MoveObject MoveDynamicObject
решение простое
PHP код:
#define CreateObject, CreateDynamicObject #define MoveObject, MoveDynamicObject
6)
PHP код:
warning 201: redefinition of constant/macro
Это означает что в дефайнах(define)
Пример:
PHP код:
#define OnPlayerEnterRaceCheckpoint #define OnPlayerEnterRaceCheckpoint
Решение одну из двух удалить!
7)
PHP код:
warning 200: symbol "%s" is truncated to 31 characters
Это обозначает что мы при создании переменной ввели больше 31 символа
Пример:
PHP код:
new sssssssssssssssssssssssssssssss;
Решение:
Просто сменить название или укоротить !
PHP код:
warning 202: number of arguments does not match definition
Это значит что у нас не совпадают аргументы
Возьмем самый простой пример:
PHP код:
Create3DTextLabel(" ТУт типо текст .",0xFFA500FF,.0120,456.2717,35.1719,20.0);
Наша ошибка содержится здесь:
PHP код:
-2041.0120,456.2717,35.1719,20.0 -2041.0120,456.2717,35.1719--------- это на ша координата (она нас не интересует) 20.0--------вот наша ошибка (20----это расстояние с которого наш текст будет виден) а вот 0 это у нас testLOS- линия видимости
решение простое:
Нам 0 нужно заменить на 1
PHP код:
Create3DTextLabel(" ТУт типо текст .",0xFFA500FF,1111.1111,111.1111,11.1111,20.1);
9)
PHP код:
warning 203: symbol is never used: %s
Это означает что данный символ нигде не используется
Пример :
Создадим допустим переменную
new respon;
И тут у нас возникает
PHP код:
(1578) warning 203: symbol is never used: "respon"
Что же делать?
Ответ прост:
найти эту переменную и удалить
10)
PHP код:
warning 204: symbol is assigned a value that is never used %s
Это значит что создали переменную и массив а он негде не используется
Пример:
PHP код:
new blabal[15];
Решения: просто удалить
11)
PHP код:
warning 209: function "%s" should return a value
Это значит что наша функция не возвращается(простыми словами нету return 1; или return 0
пример:
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == 1024) { OnPlayerCommandText(playerid,"/Blablabal"); return 1; <========Вот наш return ДО } }
Решения:
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == 1024) { OnPlayerCommandText(playerid,"/Blablabal"); } return 1; <========Вот наш return ПОСЛЕ }
[Error]
1)
PHP код:
error 040: duplicate "case" label (value 28)
это означает что case стаким значением повторяется
Решение этой проблемы простое
PHP код:
case 28: case 28:
нам нужно цифру 28 изменит на другую (в той строчке на которую жалуется )
2)
PHP код:
error 032: array index out of bounds (variable "JoinPed")
Это означает что индекс массива превышен (но не всегда смотрим дальше)
Пример:
PHP код:
new JoinPed[131][1] = {
131- массив поигравшись с ним я понял что дело не в нем, а в чём-же спросите вы?
пример данной ошибки:
PHP код:
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[98][0]; }
как видим
JoinPed[123] с начало с таким значением, а потом JoinPed[98]
Решение простое:
JoinPed[123] число в данных скобках должно быть одинаковым.
пример:
PHP код:
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[123][0]); SelectCharPlace[playerid] = 3; InviteSkin[playerid] = JoinPed[123][0]; }
3)
PHP код:
error 037: invalid string (possibly non-terminated string)
Это означает что строка неправильная а точнее где то допущена ошибка
пример:
PHP код:
else if(PlayerInfo[targetid][pRank] == 4) { rangz = "Зам.модера; }
как видим нам после слова «модера» не хватает «
пример:
PHP код:
else if(PlayerInfo[targetid][pRank] == 4) { rangz = "Зам.модера"; }
4)
PHP код:
error 001: expected token: ",", but found ";"
Это значит что мы пропустили знак или скобку (в данном примере скобку)
Пример:
PHP код:
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; }
смотрим на
PHP код:
ProdyktsInfo[idx][prZamProd];
и вим что мы пропустили )
и так оно выглядит
PHP код:
ProdyktsInfo[idx][prZamProd]);
PHP код:
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)
PHP код:
error 002: only a single statement (or expression) can follow each "case"
Это означает что у вас после «case» идет if(dialogid == )
Пример:
PHP код:
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 как и последующий диалог !
PHP код:
case 7504: <------------------- вот так это выглядит { if(response) { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); ClothesRun[playerid] = 0; return 1; }
6)
PHP код:
error 004: function "%s" is not implemented
Это означает что мы пропустили скобку.
Мой совет
1)проверить весь код в ручную
2)на форуме был урок как найти не по ставленую скобку
3)Можно воспользоватся notepad++ там показы линии открытых скобок и тогда можно найти эту скобку
7)
PHP код:
error 017: undefined symbol %s
Это означает что мы не поставили переменную (new)
Пример:
PHP код:
error 017: undefined symbol "lol"
Решение:
Ко всем new добавим
PHP код:
new lol;
Из названия все ясно. ИД’ы всех ошибок, фатальных ошибок, а также предупреждений в PAWNO.
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) — Неправильный размер массива. Отрицательное значение или ноль;
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) — Не точка входа;
error 014: invalid statement; not in switch — Неверная команда;
error 015: «default» case must be the last case in switch statement — Оператор «default» должен быть последним;
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» — ошибочное название символа (начинается с цифры, например);
error 021: symbol already defined: %s» — символ уже определён (дважды встречается new одного и того-же символа);
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 — составной оператор не закрыт в конце файла, поставить return 1;} в конец мода;
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) — Аргумент не имеет начального значения;
error 035: argument type mismatch (argument %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») — Неизвестный размер массива %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 — описание функции без заголовка (пропущен public(…));
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»;
error 061: «#elseif» directive follows an «#else» directive — «#elseif» перед «#else»;
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) — В этой функции может быть только один аргумент %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») — Переменная %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 — макрос %s должен начинаться с букв;
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»;
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» — не определенна ни одна state для функции %s;
error 086: unknown automaton «%s» — Неизвестная автоматизация %s;
error 087: unknown state «%s» for automaton «%s» — не определен state %s, для переключения %s;
error 088: number of arguments does not match definition — количество аргументов не совпадает с объявленными в функции;
fatal error 100: cannot read from file: «%s» — невозможно прочитать/найти файл %s в стандартной директории;
fatal error 107: too many error messages on one line — слишком много ошибок на одной строке (обычно из-за одного неправильного параметра);
warning 200: symbol «%s» is truncated to 31 characters — название переменной %s обрезается до 31 символа (укоротите название переменной %s);
warning 201: redefinition of constant/macro (symbol «%s») — двойное определение одинаковой константы (смотреть #define);
warning 202: number of arguments does not match definition — несовпадение количества аргументов;
warning 203: symbol is never used: «%» — символ «%» нигде не используется;
warning 204: symbol is assigned a value that is never used: «%s» — символ создан, ему присваивается значение, но далее он не используется.
warning 208: function with tag result used before definition, forcing reparse — функция с типовым результатом используется перед объявлением
warning 209: function «%s» should return a value — функция %s должна возвращать какое-либо значение (return 1; к примеру);
warning 211: possibly unintended assignment — в условии использовано не сравнение, а присвоение;
warning 213: tag mismatch — несовпадение тэгов;
warning 215: expression has no effect — выражение не имеет эффекта;
warning 216: nested comment — вложенный комментарий (вынесите его за функцию);
warning 217: loose indentation — невыровненная строка (return должен быть строго под телом функции по левому краю, либо можно добавить в начало мода строку #pragma tabsize 0, но это не рекомендуется, так как иногда может не понимать и не прочитывать скобки «{» и «}»);
warning 219: local variable «%s» shadows a variable at a preceding level — переменная дважды объявлена;
warning 224: indeterminate array size in «sizeof» expression (symbol «%s») — должен быть определён размер массива %s (если определён статиком, заменить дефайном);
warning 225: unreachable code — невалидный код;
warning 235: public function lacks forward declaration (symbol «%s») — необходим форвард функции %s (перед функцией пишем forward %s;
Пояснение: «%s — имя переменной/макроса/аргумента функции».
Авторы: OKStyle, webserfer, Kaza40k, [Nos]B[R]aiN[L], Ym[0]n, _volk_, ДениСыч, Roman1us.
При копировании на другие ресурсы, обязательно указывайте авторов, не зря ведь люди старались
Сидел я как-то и думал, чтобы такого придумать. Ни чего не придумал. )))
В итоге решил вот поделиться небольшим мануалом или даже не знаю как его назвать, для пользователей данного форума.
— Хотя, честно говоря, что пользователи, что форум — сильно испохабился, не тот он, что был 3.5 года назад, но именно при помощи него, у меня получилось сделать свой игровой сервер Counter Strike 1.6
error 001 : expected token: «%s» but found «%s»
— должен был быть символ: «%s» но был найден: «%s»
error 002 : only a single 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» с одним и тем же параметром. (%d)
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» (несколько «#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 »
— функция использует «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»)
— Конфликт state (функция созданная структурой) одна из «state» уже создана в другом месте. (символ %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
— количество аргументов не совпадает с объявленными в функции.
Источник
Adblock
detector
15.04.2014, 09:27
(
Последний раз редактировалось NaClchemistryK; 01.05.2014 в 08:22.
)
Yo guys.
This is my first tutorial ever done, so please don’t laugh if it is bad/useless/messy..
So I was going through the tutorials and realized that there are just a few threads that descrive how to fix errors. Since a am a rookie scripter, I will only tell you about the most frequent errors done by newbies. That’s why this tutorial is specially for scripters who have started learning.
Let’s start.
Код:
error 017: undefined symbol
This is a error message that tells you that you have just written a symbol/code name that is yet undefined.
Let’s suppose we did following
pawn Код:
public OnPlayerConnect(playerid)
{
SenClientMessage(playerid,0xFFFFFF,"You have connected to our server! Enjoy your stay!");
return 1;
}
Oops! We just realized that we wrote «SenClientMessage» instead of «SendClientMessage», so this would give us the error saying that «SenClientMessage» is an undefined symbol. Things like these don’t only occur by mistyping, they could also mean that you have forgotten to define a variable, or a colour name etc…
pawn Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COL_BRIGHTBLUE,"You have connected to our server! Enjoy your stay!");
return 1;
}
simply writing this would give us the error
Код:
error 017: undefined symbol "COL_BRIGHTBLUE
why? Because we forgot to define COL_BRIGHTBLUE above. So we’ll have to define it.
pawn Код:
#define COL_BRIGHTBLUE 0xFFFFFF
Here’s another common error:
Код:
: error 037: invalid string (possibly non-terminated string)
I don’t know if a lot of people do this, but I do this so damn often…
Now looking at the error message, it says «possibly non-terminated string)», means that it could have been that the string wasn’t completed. What could this mean? Simply that we didn’t end the string. And example of this mistake:
pawn Код:
SendClientMessage(playerid,0xFFFFFF,"You have connected to our server! Enjoy your stay!);
non terminated string means, that we didn’t tell the script that our message has ended. Now what does end a string in the function SendClientMessage? the «»s. Now we should’ve realized that we have forgotten to add a ‘ » ‘ to end the string. add it, and the error should be fixed.
Now that I think about it, this wrongly made code should give more errors, like «undefined symbol «You»», «undefined symbol «have»» etc, because the string hasn’t ended, so the script will think that it is some sort of a function. But the compiler knows that the third argument of SendClientMessage is a string.
Concearning arguments:
Код:
error 035: argument type mismatch (argument [number])
Newbs might get this error often, since they sometimes forget the arguments of a function.
This error refers to a simple error. let’s suppose we wrote this:
pawn Код:
SendClientMessage(0xFFFFFF,"You have connceted to our server! Enjoy your stay here!");
This would give us the error «argument type mismatch(argument 2)». This means that we haven’t written the argument we should have written. This error says that there is something wrong with a certain argument, or doesn’t make sense. Here are the parameters of SendClientMessage:
playerid, [colour], const message[]
Now, you should all have realized that we forgot the «playerid». Because we have to tell the script to WHOM we want to send the message.
Код:
warning 202: number of arguments does not match definition
This is also a mistake, that can be done, also concearns arguments. This says us that we haven’t written the correct amount of arguments. Let’s suppose we wrote something extremely stupid…. for god’s sake, I’m just trying to explain, so don’t laugh…
pawn Код:
SendClientMessage(playerid,0xFFFFFF,"You have connected to our server! Enjoy your stay!",playerid);
yea yea, who would write this…
Now looking at it, we wrote 4 arguments, even though the function SendClientMessage has 3 arguments. so we must remove the «playerid» at the very end, cause it’s useless. a script doesn’t need an extra explenation of what it needs to do. A human might forget whether he should give the cup of tea to his brother or his dad, but a script is rim by a computer, you know… but that doesn’t mean it can’t do mistakes… another common error:
Код:
error 001: expected token: ";", but found "[symbol]"
Errur numbah one!!!! So this error id numbah one tells you that a «;» is missing. example:
pawn Код:
SendClientMessage(playerid,0xFFFFFF,"You have connected to our server! Enjoy your stay!")
return 1;
This will gives us the error «expected token: «;» but found «return»» . EXTREMELY SIMPLY means that we forgot to write a «;» at the end of the function SendClientMessage(). now, when you look at the line given at the error, it will give you the error at the line of «return», because when he doesn’t find that token behind SendClientMessage(), then he will look for it at the next line, and then the next, until he finds a symbol.
Well, a few last words…
This tutorial isn’t completely finished, since I just realized that you have to explain a lot, so well.
Thanks a lot for reading, and I hope I helped you.
Updates
Here, you will find the updates and their post number. I won’t edit the original topic, else it will get too long.
Update: April 21st 2014, post number 5
Update: April 30th 2014, post number 8
namikazze
Начинающий
- Регистрация
- 24 Мар 2021
- Сообщения
- 14
- Лучшие ответы
- 0
- Репутация
- 0
-
#1
Столкнулся с ошибкой, который раньше не было, был баг в /adonate, его пофиксил и вылезла данная ошибка, в моде всё дописано.
(42298) : error 037: invalid string (possibly non-terminated string) — код, строка.
Перед строкой идёт — {FFCD00}Уникальные аксессуары [НОВЫЙ НАБОР]{8BD032}30 рубn
Сама строка: return true;
Пожалуйста, помогите. (cпойлер делать не умею)
Author |
Message |
|||
Senior Member Join Date: Dec 2013 Location: Israel |
|
|||
|
Veteran Member Join Date: Oct 2013 Location: { closing the void; } |
|
|||
|
Member Join Date: Jul 2013 Location: Guatemala |
|
|||
|
Veteran Member Join Date: Oct 2013 Location: { closing the void; } |
|
|||
|
Senior Member Join Date: Dec 2013 Location: Israel |
|
|||
|
Veteran Member Join Date: Oct 2013 Location: { closing the void; } |
|
|||
|
Senior Member Join Date: Dec 2013 Location: Israel |
|
|||
|
Veteran Member Join Date: Oct 2013 Location: { closing the void; } |
|
|||
|
SourceMod Developer Join Date: Aug 2009 Location: OnGameFrame() |
|
|
Veteran Member |
|
|||
|
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 - количество аргументов не совпадает с объявленными в функции;
Как исправить 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(playerid, 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
ClothesRun[playerid] = 0;
return 1;
}
error 004: function «%s» is not implemented
Это означает что мы пропустили скобку. Мой совет:
- проверить весь код в ручную
- на форуме был урок как найти не по ставленую скобку
- Можно воспользоватся notepad++ там показы линии открытых скобок и тогда можно найти эту скобку
error 017: undefined symbol %s
Это означает что мы не поставили переменную new. Пример:
Решение — ко всем new добавим: