#1
Отправлено 13 мая 2016 — 20:42
-
- Эксперт
-
H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(254) : error 001: expected token: "-identifier-", but found "-integer value-" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : error 028: invalid subscript (not an array or too many subscripts): "pName" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : warning 215: expression has no effect H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : error 001: expected token: ";", but found "]" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : error 029: invalid expression, assumed zero H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
Ошибка 254
static STR[256];
В коде
new ID_KLANS; static BIGSTR[1000]; static STR[256]; // злая enum klans { kOwner[32], kName[35], kParty, kRang[32], kColor }; new KlanInfo[MAX_KLANS][klans]; static const KLN0[4][] = { {"{006400}Добро пожаловать в меню создания нового клана!nn"}, {"{FF8C00}С создание клана для Вас буду открыты новые возможности, а именно:n"}, {"{FF0000}---> {FFFFFF}Приглашать и выгонять игроков из клана!n{FF0000}---> {FFFFFF}Назначать заместителя клана!n{FF0000}---> {FFFFFF}Изменять цвет клана!n{FF0000}---> {FFFFFF}Для Вашего клана будет отдельный чат!nn"}, {"{FFFF00}Введите название Вашего клана:"} }; static KLN1[7][1] = { {0xFF0000FF}, // Красный {0xFFFF00FF}, // Желтый {0x006400FF}, // Зеленый {0x0000FFFF}, // Синий {0xFF8C00FF}, // Оранжевый {0xFFFFFFFF}, // Белый {0x800080FF} // Фиолетовый }; //
Ошибка 5146
pName[24]
В коде
if(pStats[playerid][pLogged] == 0) { SendClientMessage(playerid, 0xF6F600AA, "{00FF00}[DM™] {FFFFFF}Введите свой {FF0000}пароль!"); return 0; } pName[24] GetPlayerName(playerid,pName,24);
1
#2
Отправлено 13 мая 2016 — 21:02
-
- Эксперт
-
H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(254) : error 001: expected token: "-identifier-", but found "-integer value-" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(5146) : warning 219: local variable "pName" shadows a variable at a preceding level H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(7166) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(7166) : warning 215: expression has no effect H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(7166) : error 001: expected token: ";", but found "]" H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(7166) : error 029: invalid expression, assumed zero H:Documents and Settings???????????????????? ????DMgamemodesGT.pwn(7166) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
Исправлял =)
new pName[24]; GetPlayerName(playerid,pName,24);
1
#3
Отправлено 13 мая 2016 — 21:09
-
- Профессионал
-
Разве static может быть глобальный ?
pName уже где то объявлен
0
#4
Отправлено 13 мая 2016 — 21:22
-
- Эксперт
-
Pa4enka (13 мая 2016 — 21:09) писал:
H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(5145) : warning 219: local variable "pName" shadows a variable at a preceding level H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(7165) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(7165) : warning 215: expression has no effect H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(7165) : error 001: expected token: ";", but found "]" H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(7165) : error 029: invalid expression, assumed zero H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(7165) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors.
[code] } new pName[24]; GetPlayerName(playerid,pName,24);
[/code]
5145
и
7165
if(PlayerInfo[playerid][pKlan] == 0) return SendClientMessage(playerid, -1, "У вас нет клана!"); if(!strcmp(KlanInfo[PlayerInfo[playerid][pKlan]],pName(playerid),true))
1
#5
Отправлено 13 мая 2016 — 21:29
-
- Профессионал
-
GetPlayerName(playerid,pName,24);
new не нужно там.
Сообщение отредактировал Pa4enka: 13 мая 2016 — 21:29
0
#6
Отправлено 13 мая 2016 — 21:32
-
- Эксперт
-
Pa4enka (13 мая 2016 — 21:29) писал:
H:Documents and SettingsАдминистраторРабочий столDMgamemodesGT.pwn(5145) : error 076: syntax error in the expression, or invalid function call
1
#7
Отправлено 13 мая 2016 — 21:36
-
- Профессионал
-
В моде есть где то pName? Может он в PlayerInfo объявлен
0
#8
Отправлено 13 мая 2016 — 21:37
-
- Эксперт
-
Pa4enka (13 мая 2016 — 21:36) писал:
В моде есть где то pName? Может он в PlayerInfo объявлен
if(PlayerInfo[playerid][pKlan] == 0) return SendClientMessage(playerid, -1, "? ??? ??? ?????!"); if(!strcmp(KlanInfo[PlayerInfo[playerid][pKlan]],pName(playerid),true))
0
#9
Отправлено 13 мая 2016 — 21:38
-
- Профессионал
-
0
#10
Отправлено 13 мая 2016 — 21:42
-
- Эксперт
-
Pa4enka (13 мая 2016 — 21:38) писал:
Ищо
PlayerInfo[playerid][pKlan]) return SendClientMessage(playerid, -1,"Этот игрок не состоит в Вашем клане!"); format(string, sizeof(string), "%s снят с должности заместителя!", pName(playerid));
и
тут
format(string,sizeof(string), "Игрок %s приглашает вступить в клан %s", pName(playerid), KlanInfo[PlayerInfo[playerid][pKlan]][kName]);
и тут
Везде где есть клан
Сообщение отредактировал NazarKuleba: 13 мая 2016 — 21:44
0
- ← Предыдущая тема
- Проблемы с компилированием
- Следующая тема →
- Вы не можете создать новую тему
-
Тема закрыта
1 человек читают эту тему
0 пользователей, 1 гостей, 0 скрытых пользователей
Содержание
- Error 001 expected token but found integer value
- Форум Pawn.Wiki — Воплоти мечту в реальность!: Все о ошибках и их устранении — Форум Pawn.Wiki — Воплоти мечту в реальность!
- Форум Pawn.Wiki — Воплоти мечту в реальность!: error 001: expected token: «;», but found «:» — Форум Pawn.Wiki — Воплоти мечту в реальность!
- Форум Pawn.Wiki — Воплоти мечту в реальность!: error 001 error 028 warning 214 error 29 fatal err — Форум Pawn.Wiki — Воплоти мечту в реальность!
Error 001 expected token but found integer value
This is a list of meanings of all the error/warnings in PAWN, included some examples and fixes.
This page includes;
— Error: 001 (
— Error: 017
— Error: 020
— Error: 021 NEW
— Error: 029
— Error: 032
— Error: 033
— Error: 035 NEW
— Error: 037 NEW
— Warning: 202
— Warning: 203
— Warning: 204 NEW
— Warning: 217
— Warning: 215 NEW
— Warning: 219 NEW
— Fatal Error: 107 NEW
If you find any other errors/warnings, please post it here and tell me how you got it, and fixed it.
* This page is «in-the-make» and can be updated anytime!
* Error 001: expected token: «>», but found «[«
— Used too many arrays inside an enum variable.
* Error 001: expected token: «>», but found «]»
— Found ] inside an enum variable.
* Error 001: expected token: «,», but found «;»
— A function has not been finished.
* Error 001: expected token: «]», but found «,»
— There is no ] at the end of an enum variable.
* Error 001: expected token: «]», but found «;»
— There is no ] at the end of an array.
* Error 001: expected token: «;», but found «xxx..»
— Variable is using invalid symboles.
* Error 001: expected token: «;», but found «-identifier-«
— You forgot «;» after calling a function.
* Error 001: expected token: «;», but found «-integer value-«
— You forgot a [, ], or both while making an array.
Источник
Форум Pawn.Wiki — Воплоти мечту в реальность!: Все о ошибках и их устранении — Форум Pawn.Wiki — Воплоти мечту в реальность!
- Pawn скриптинг
- Школа скриптинга
- Уроки
- Правила форума
- Просмотр новых публикаций
- Группа: Активные пользователи
- Сообщений: 443
- Регистрация: 23 марта 13
Список часто встречаемых ошибок в pawno
Данная тема содержет наиболее распространенные ошибки и предупреждения в pawno при создании скриптов sa-mp
Когда компилятор находит ошибку в файле, то выводится сообщение, в таком порядке:
- Имя файла
- номер строки компилятора были обнаружены ошибки в скобках, непосредственно за именем
- класс error (ошибка, фатальная ошибка или предупреждение)
- номер ошибки
- описание ошибки
Примечание: эта ошибка может быть на линии, над линией, что показано, так как компилятор не всегда может установить ошибку перед проанализировав полное выражение.
Ошибки разделяются на три класса:
Ошибки (errors)
- Описание ситуации когда компилятор не может скомпилировать код
- Ошибки номеруются от 1 до 99
Критические ошибки (Fatal errors)
- Критические ошибки и описание, от которых компилятор не может восстановиться.
- Парсинг прерывается (нет отклика программы).
- Критические ошибки номеруются от 100 до 199.
Предупреждения ( Warings )
- Предупреждения указывают на возможную причину возникновения багов, вылетов.
- Предупреждения номеруются от 200 до 299.
001: expected token (ожидаемый знак)
Обязательный знак отсутствует
002: only a single statement (or expression) can follow each “case” (только одно выражение может быть в одной строке с «case»
В каждом case оператора switch без фигурных скобок может содержаться только один оператор если больше нужно ставить скобки.
Пример:
Так же могут быть еще и предупреждения и дополнительные ошибки:
Вот так это можно исправить:
004: function «x» is not implemented (Функция «x» не используется
Часто бывает что в функции выше пропущена скобка.
025: function heading differs from prototype
Это проиходит когда в функции не совпадают аргументы.
035: argument type mismatch (argument x) (не совпадение типов аргумента(ов)
К примеру когда в место playerid — integer аргумента стоит «playerid» — string или 0.5 — float
046: unknown array size (variable x)
Не указан размер массива.
047: array sizes do not match, or destination array is too small
Размер массива мал или не совпадает.
- Многомерные массивы должны иметь одинаковый размер
- Одномерные массив к которому присваивают(правый должен иметь больше размер чем левый.
В приведенном выше коде размер строки «Hello world!» ровна 12 байт а массив к которому присваиваем имеет размер 8 байт из этого и складывается ошибка.
Если увеличить размер массива destination до 13 байт то ошибка исправится.
055: start of function body without function header
Начало тела функции без функции заголовка.
Критические ошибки (FATAL ERRORS)
Компилятор не может найти или прочитать указанный файл, убедитесь что он находится по адресу ( pawnoinclude).
Пример:
Совет
Не нужно открывать ваш код дважды, не нужно тыкать несколько раз на файл. Откройте сначала редактор, потом ваш проект.
202: number of arguments does not match definition
Описание ошибки довольно понятное, это значит что вы используете слишком мало или слишком много аргументов в функции, обычно это признак того что функция используется не правильно, обратитесь к документации.
Функция GetPlayerHealth согласно официальному источнику wiki.sa-mp.com имеет два аргумента playerid и Float:health ссылка
203: symbol is never used: «symbol»
Вы создали переменную или функцию и она ни где не используется тогда ищите в окне компилятора это предупреждение, это не как не влияет на код и не угражает ему, так что если вы удалите переменную или функцию которая не используется, то вы сэкономите память.
204: symbol is assigned a value that is never used: «symbol»
Это предупреждение аналогично к предыдущему, разница в том что к переменной что то присвоено и оно не как не используется, это безопасно 🙂
209: function should return a value
Функция ничего не возвращает, вы создали её:
Решили её присвоить к чему нибудь к примеру:
Вот так исправить
211: possibly unintended assignment
Если вы введете оператор присваивания в условии и оно не будет в круглых скобках то будет предупреждение
213: tag mismatch ( несовпадение тегов)
Это происходит когда:
- Тип переменной указан не верно или не имеет его
- Выражения по обе стороны бинарного оператора имеют разные теги
- В пременную возвращен не верный тип переменной или не имеющий его.
- Индексирование массива, который требует тегами индекс без тега или неправильное имя тега
Часто это бывает на 3d текстах или тексдравах Text3D, Text
217: loose indentation
Компилятор выдаст ошибку если не соблюдены отступы.
Отступы делаются по нажатью кнопки TAB это практика в программировании для удобного чтения кода.
219: local variable «foo» shadows a variable at a preceding level
Локальная переменная в тени глобальной то есть над локальной переменной создана точно такая же глобальная. В практике программирования префиксом глобальной переменной является «g» в начале переменной к примеру
любыми способами избегайте их.
Решение:
Просто переименуйте локальную переменную team.
225: unreachable code ( недоступный код )
Это происходит тогда когда вы пишите какой нибудь код после return, после return’а код не выполняется и он считается бесполезным
235: public function lacks forward declaration (symbol «symbol»)
Отсутствует forward.
Надеюсь эта статья поможет вам в языке программирования, желаю вам не повторять ошибок дважды и что бы ваш код был быстрым, надежным!
Оставляйте ваши отзывы, ставьте плюсы, пишите недостатки ошибки, недостатки статьи или их недочеты. Удачи в мире PAWNO!
Источник
Форум Pawn.Wiki — Воплоти мечту в реальность!: error 001: expected token: «;», but found «:» — Форум Pawn.Wiki — Воплоти мечту в реальность!
- Pawn скриптинг
- Первая помощь
- Проблемы с компилированием
- Правила форума
- Просмотр новых публикаций
- Группа: Vip
- Сообщений: 353
- Регистрация: 07 января 15
C:UsersHomeDesktop1gamemodesnew.pwn(6901) : error 014: invalid statement; not in switch
C:UsersHomeDesktop1gamemodesnew.pwn(6901) : warning 215: expression has no effect
C:UsersHomeDesktop1gamemodesnew.pwn(6901) : error 001: expected token: «;», but found «:»
C:UsersHomeDesktop1gamemodesnew.pwn(6901) : error 029: invalid expression, assumed zero
C:UsersHomeDesktop1gamemodesnew.pwn(6901) : fatal error 107: too many error messages on one line
Код не полностью скопировал
Сообщение отредактировал SeregaS: 21 апреля 2015 — 06:33
- Группа: Vip
- Сообщений: 353
- Регистрация: 07 января 15
Всё сам исправил!)
Только вот что вышло:
Источник
Форум Pawn.Wiki — Воплоти мечту в реальность!: error 001 error 028 warning 214 error 29 fatal err — Форум Pawn.Wiki — Воплоти мечту в реальность!
- Pawn скриптинг
- Первая помощь
- Проблемы с компилированием
- Правила форума
- Просмотр новых публикаций
- (3 Страниц)
- 1
- 2
- 3
- >
- Вы не можете создать новую тему
Тема закрыта
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
Ошибка 254
static STR[256];
В коде
Ошибка 5146
pName[24]
В коде
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
- Группа: Vip
- Сообщений: 4 001
- Регистрация: 10 апреля 15
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
Pa4enka (13 мая 2016 — 21:09) писал:
- Группа: Vip
- Сообщений: 4 001
- Регистрация: 10 апреля 15
new не нужно там.
Сообщение отредактировал Pa4enka: 13 мая 2016 — 21:29
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
Pa4enka (13 мая 2016 — 21:29) писал:
- Группа: Vip
- Сообщений: 4 001
- Регистрация: 10 апреля 15
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
Pa4enka (13 мая 2016 — 21:36) писал:
- Группа: Vip
- Сообщений: 4 001
- Регистрация: 10 апреля 15
- Группа: Активные пользователи
- Сообщений: 834
- Регистрация: 28 января 16
Pa4enka (13 мая 2016 — 21:38) писал:
Сообщение отредактировал NazarKuleba: 13 мая 2016 — 21:44
Источник
This is a list of meanings of all the error/warnings in PAWN, included some examples and fixes.
This page includes;
Quote:
— Error: 001 (
— Error: 017
— Error: 020
— Error: 021 NEW
— Error: 029
— Error: 032
— Error: 033
— Error: 035 NEW
— Error: 037 NEW
— Warning: 202
— Warning: 203
— Warning: 204 NEW
— Warning: 217
— Warning: 215 NEW
— Warning: 219 NEW
— Fatal Error: 107 NEW
If you find any other errors/warnings, please post it here and tell me how you got it, and fixed it.
* This page is «in-the-make» and can be updated anytime!
====================================>
* Error 001: expected token: «}», but found «[«
— Used too many arrays inside an enum variable.
Example:
pawn Код:
enum testenum
{
test[2][5],
};
new testvariable[testenum];
Fix:
pawn Код:
enum testenum
{
test[2],
};
new testvariable[testenum];
===>
* Error 001: expected token: «}», but found «]»
— Found ] inside an enum variable.
Example:
pawn Код:
enum testenum
{
test],
};
new testvariable[testenum];
Fix:
pawn Код:
enum testenum
{
test,
};
new testvariable[testenum];
===>
* Error 001: expected token: «,», but found «;»
— A function has not been finished.
Example:
Fix:
===>
* Error 001: expected token: «]», but found «,»
— There is no ] at the end of an enum variable.
Example:
pawn Код:
enum testenum
{
test[2,
};
new testvariable[testenum];
Fix:
pawn Код:
enum testenum
{
test[2],
};
new testvariable[testenum];
===>
* Error 001: expected token: «]», but found «;»
— There is no ] at the end of an array.
Example:
Fix:
===>
* Error 001: expected token: «;», but found «xxx..»
— Variable is using invalid symboles.
Example:
Fix:
===>
* Error 001: expected token: «;», but found «-identifier-«
— You forgot «;» after calling a function.
Example:
Fix:
===>
* Error 001: expected token: «;», but found «-integer value-«
— You forgot a [, ], or both while making an array.
Example:
OR
OR
Fix:
OR
====================================>
* Error 017: undefined symbol «test»
— «test» has been used, but never created/defined.
Example:
or
Fix:
OR
====================================>
* Error 020: invalid symbol name «»
— Variable is using invalid symboles in front.
Example:
Fix:
====================================>
* Error 021: symbol already defined: «test»
— Variable has already been created.
Example:
Fix:
====================================>
* Error 029: invalid expression, assumed zero
— Variable or function is not completed.
Example:
OR
OR
Fix:
OR
====================================>
* Error 032: array index out of bounds (variable «test»)
— A number in an array in «test» is above the created limit.
Example:
Fix:
====================================>
* Error 033: array must be indexed (variable «test»)
— There is an array missing in «test».
Example:
Fix:
====================================>
* Error 035: argument type mismatch (argument xxx)
— Wrong usage of a parameter in a function.
Example:
pawn Код:
SendClientMessage("playerid", 0x000000FF, "This is a test message!");
Fix:
pawn Код:
SendClientMessage(playerid, 0x000000FF, "This is a test message!");
====================================>
* Error 037: invalid string (possibly non-terminated string)
— The usage of a string is wrong (probably forgot a «).
Example:
pawn Код:
SendClientMessage(playerid, 0x000000FF, "This is a test message!);
Fix:
pawn Код:
SendClientMessage(playerid, 0x000000FF, "This is a test message!");
====================================>
* Warning 202: number of arguments does not match definition
— The called function has too less or too many parameters.
Example:
WHILE
pawn Код:
test(int1, int2)
{
// stuff
}
Fix:
====================================>
* Warning 203: symbol is never used: «test»
— «test» has been created/defined, but never used.
Example:
OR
pawn Код:
testfunction(test)
{
// stuff
}
Fix:
OR
pawn Код:
testfunction()
{
// stuff
}
====================================>
* Warning 204: symbol is assigned a value that is never used: «test»
— Variable has been created and set, but has no effect.
Example:
Fix:
pawn Код:
new test;
test = 1;
if(test == 1)
{
// Etc..
====================================>
* Warning 215: expression has no effect
ATTENTION: Please fix any other errors first!
— Variable has been used but never created.
Example:
Fix:
====================================>
* Warning 217: loose indentation (Thanks to LarzI)
— Incorrect identation.
Example:
pawn Код:
if( strcmp( cmdtext, "/test", true ))
{
MyFunctionHere;
if( something == somethingElse )
{ somethingMuchElse; }
return true;
}
OR
pawn Код:
if( strcmp( cmdtext, "/test", true ))
{
MyFunctionHere;
if(something == somethingElse)
{
somethingMuchElse;
}
return true;
}
Fix:
Indentation is tabs in script.
First code starts at column 0 (or 1) which is 0 tabs.
If a sub-part of a code (after a opening bracket { or if statement generally) you put a tab.
pawn Код:
if( strcmp( cmdtext, "/test", true ))
{ //first part of code, no tabs
MyFunctionHere; //pawn uses 4 spaces for one tab. This is after a opening bracket, therefore we enter one tab.
if( something == somethingElse ) //here is another statement, but followed by a bracket, so the bracket won't be indented.
{
somethingMuchElse; //this, on the other hand, is after a bracket, therefore we indent with another tab.
} //the bracket is closed, therefore we go back to the column where the bracket is positioned (indented).
return true; //still the same column, since there are no more opening-brackets, and no statements.
} //closing this part of code - go back to the first column
====================================>
* Warning 219: local variable «test» shadows a variable at a preceding level (Thanks to randomkid8
— A same named variable has been created at a preceding level.
Example:
pawn Код:
public TestFunction()
{
new test;
if(Example)
{
new test;
test = 1;
}
}
Fix:
pawn Код:
public TestFunction()
{
new test;
if(Example)
{
test = 1;
}
}
====================================>
* Fatal error 107: too many error messages on one line
ATTENTION: Please fix any other errors first!
— There are too many errors.
- Регистрация
- 15 Окт 2013
- Сообщения
- 63
- Лучшие ответы
- 0
- Репутация
- 0
-
#1
Всем привет!
Я столкнулся с такой проблемой
При компиляции выдает ошибку:
HTML:
error 001: expected token: "-identifier-", but found "-integer value-"
Вот строка
HTML:
BYTES_PER_CELL = cellbits / 8;
Вот сам сток
HTML:
stock SendFormattedMessage(playerid, color, fstring[], {Float, _}:...)
{
static const
STATIC_ARGS = 3,
BYTES_PER_CELL = cellbits / 8;
new
n = (numargs() - STATIC_ARGS) * BYTES_PER_CELL;
if (n)
{
new message[128],arg_start,arg_end;
#emit CONST.alt fstring
#emit LCTRL 5
#emit ADD
#emit STOR.S.pri arg_start
#emit LOAD.S.alt n
#emit ADD
#emit STOR.S.pri arg_end
do
{
#emit LOAD.I
#emit PUSH.pri
arg_end -= BYTES_PER_CELL;
#emit LOAD.S.pri arg_end
}
while (arg_end > arg_start);
#emit PUSH.S fstring
#emit PUSH.C 128
#emit PUSH.ADR message
n += BYTES_PER_CELL * 3;
#emit PUSH.S n
#emit SYSREQ.C format
n += BYTES_PER_CELL;
#emit LCTRL 4
#emit LOAD.S.alt n
#emit ADD
#emit SCTRL 4
return SendClientMessage(playerid, color, message);
}
else
{
return SendClientMessage(playerid, color, fstring);
}
}
я все форумы посмотрел, но проблему не решил, с меня +
надежда на вас ребята!
-
#1
Написал мод, начал компилировать, вышла ошибка:
C:UsersUserDesktopСерверgamemodesAdventure Rp.pwn(25) : error 001: expected token: «-identifier-«, but found «-integer value-«
Вот само начало:
#include <a_samp>
#include <mxINI>
#define green 0xFF00000
#define IsPlayerSpawned
#define SPEC_TYPE_NONE 0
#define pAdmin 0
#define pPass 0
#define Muted 0
#define SpecID 0
#define Freeze 0
#define Jailed 0
#define SpecType 0
#define Zhertva 0
#define pCash 0
#define pKills 0
#define pScore 0
#define pPass[64], 0
#include <mxINI>
forward OnPlayerRegister(playerid, password[]);
forward OnPlayerLogin(playerid,password[]);
enum pInfo
{
pPass[64],
pAdmin,
pKills,
pCash,
pScore,
Muted,
Jailed,
SpecID[MAX_PLAYERS],
SpecType[MAX_PLAYERS],
Freeze,
Zhertva,
Spawned,};
new Player[MAX_PLAYERS][pInfo];
new PAccount[MAX_PLAYERS];
Просьба помочь и объяснить, как этого избегать.
Последнее редактирование модератором: 05.11.2016
-
#2
Попробуйте убрать это:
#define pPass 0
Либо вставить после enum pInfo
-
#4
@daniilobol,
enum pInfo
{
pPass[64],
pAdmin,
pKills,
pCash,
pScore,
Muted,
Jailed,
SpecID[MAX_PLAYERS],
SpecType[MAX_PLAYERS],
Freeze,
Zhertva,
Spawned
};
(pInfo замените тем, что выше). Запятая в конце быть не может находиться. Это не должно помочь при вашей проблеме, но вскоре из-за этого могут возникнуть другие. Что касается pPass, не присваиваются ли ему какие-нибудь значения в моде дальше?
Последнее редактирование модератором: 05.11.2016
Hello coders! I’m trying to make message from rows defined in array, but getting error 001: expected token: «]», but found «-identifier-«.
Can someone help me to fix it?
Here’s problem code:
PHP Code:
new const BHP2_HEADER[] = "^n* Possible arguments:^n"
new const BHP2_HELP[][128] = {
"* help - show this message^n",
"* toggle - toggle bhop^n",
"* autojump <1 | 0> - toggle autojump^n",
"* list - show bhop users list^n" }
new const BHP2_FOOTER[] = "***"
new xbh_help_msg[1024]
public
xbhop_help(id)
{
new i
format(xbh_help_msg, charsmax(xbh_help_msg), "%s", BHP2_HEADER)
for(
i=0; i < 3; i++)
{
// PROMBLEM CODE IS BELOW
add(xbh_help_msg, charsmax(xbh_help_msg), BHP2_HELP[i], charsmax(BHP2_HELP[i])) //ERROR COMES HERE
// PROMBLEM CODE IS ABOVE
}
add(xbh_help_msg, charsmax(xbh_help_msg), BHP2_FOOTER, charsmax(BHP2_FOOTER))
client_print(id, print_console, xbh_help_msg)
return
PLUGIN_HANDLED
}