SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 08/01/2014, 03:34 AM   #10451
Urukhay
Gangsta
 
Join Date: Sep 2013
Posts: 639
Reputation: 2
Default Re: Скриптинг курилка

Почему если писать такой запрос:
PHP Code:
UPDATE `dataSET Name='BOT' LIMIT 2 
То он обновит 2 первые строки

А на такой:
PHP Code:
UPDATE `dataSET Name='BOT' LIMIT 1,
Ругается такой ошибкой:
HTML Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
Urukhay is offline   Reply With Quote
Old 08/01/2014, 04:14 AM   #10452
k3dr
Big Clucker
 
k3dr's Avatar
 
Join Date: Oct 2013
Location: sudd3n
Posts: 129
Reputation: 0
Default Re: Скриптинг курилка

Лимит не корректный.
__________________
k3dr is offline   Reply With Quote
Old 08/01/2014, 09:38 AM   #10453
Stepashka
Godfather
 
Stepashka's Avatar
 
Join Date: Jul 2008
Location: near PC
Posts: 5,763
Reputation: 142
Default Re: Скриптинг курилка

Quote:
Originally Posted by Urukhay View Post
Почему если писать такой запрос:
PHP Code:
UPDATE `dataSET Name='BOT' LIMIT 2 
То он обновит 2 первые строки

А на такой:
PHP Code:
UPDATE `dataSET Name='BOT' LIMIT 1,
Ругается такой ошибкой:
HTML Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
Нельзя обновлять поля с какого-то по какое-то, можно обновлять только сколько-то по какому-то условию. В твоем случае условия нет, т.е. все!
В добавок у тебя не указан порядок сортировки данных, поэтому не удивляйся если вдруг будут обновляться разные строки.
__________________
Клятва Страуструпа: "Я обязуюсь прилежно комментировать свой код, не использовать goto и следить за состоянием своих потоков и выделяемой памяти. Я обязуюсь не оставлять мусора в системе и избегать однобуквенных переменных. Ресет." © Куч
M&M GM
Status: ON HOLD

Stepashka is online now   Reply With Quote
Old 08/01/2014, 10:13 AM   #10454
Roll1nger
Little Clucker
 
Join Date: Jan 2014
Posts: 12
Reputation: 0
Default Re: SA-MP 0.3x

Уже 5-ый день одна и та же фигня. Сервер зависает, но не выключается. Патч новый поставили, но ничего не изменилось.
Code:
[14:29:46] CONNECT: ID: 6 VERSIYA: 0.3x-R1-2
[14:29:46] Warning-Budko: Blocked attack from ID: 7
[14:29:46] [part] Antony_Shapovalov has left the server (7:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 14
[14:29:46] [part] Smith_Frutello has left the server (14:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 19
[14:29:46] [part] AleX_Chirkov has left the server (19:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 33
[14:29:46] [part] Diego_Barosi has left the server (33:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 35
[14:29:46] [part] Hell_energy has left the server (35:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 40
[14:29:46] [part] Diego_Ward has left the server (40:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 57
[14:29:46] [part] Trevor_Pozitiv has left the server (57:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 64
[14:29:47] [part] Jack_Smith has left the server (64:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 79
[14:29:47] [part] Denis_Derpy has left the server (79:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 115
[14:29:47] [part] Cristopher_Silva has left the server (115:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 125
[14:29:47] [part] James_Carnewal has left the server (125:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 134
[14:29:47] [part] Roman_Yugay has left the server (134:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 140
[14:29:47] [part] Jhoe_Morello has left the server (140:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 144
[14:29:47] [part] Nikita_Shapovalov has left the server (144:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 148
[14:29:47] [part] Egor_Bobenok has left the server (148:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 150
[14:29:47] [part] Danil_Memorik has left the server (150:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 169
[14:29:47] [part] Jeff_Barosi has left the server (169:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 172
[14:29:47] [part] Evgeniy_Nadeinskiy has left the server (172:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 174
[14:29:47] [part] Diego_Martin has left the server (174:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 179
[14:29:47] Incoming connection: 85.140.35.97:49836
[14:29:48] [part] Andrei_Red has left the server (179:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 185
[14:29:48] [part] Sergey_Kudryavcev has left the server (185:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 188
[14:29:48] [part] Denis_Sugou has left the server (188:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 195
[14:29:48] [part] Elkin_Elkin has left the server (195:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 198
[14:29:48] [part] Max_Vegas has left the server (198:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 199
[14:29:48] [part] Martin_Gudni has left the server (199:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 204
[14:29:48] Incoming connection: 78.106.127.149:2439
[14:29:48] [part] zukaito has left the server (204:2)
[14:29:48] [part] Wiz_Knalifa has left the server (37:2)
[14:29:48] [debug] Run time error 4: "Array index out of bounds"
[14:29:48] [debug] Accessing element at negative index -1
[14:29:48] [debug] AMX backtrace:
[14:29:48] [debug] #0 0015fa34 in public GunReady (0x00000012) from 2.amx
[14:29:48] [debug] Run time error 4: "Array index out of bounds"
[14:29:48] [debug] Accessing element at negative index -1
[14:29:48] [debug] AMX backtrace:
[14:29:48] [debug] #0 0015fa34 in public GunReady (0x0000003f) from 2.amx
[14:29:45] (1) Invalid client connecting from 46.98.243.22
[14:29:45] (1) Invalid client connecting from 81.161.214.153
[14:29:45] [chat] [Martin_Gudni]: Сэр...
[14:29:45] (1) Invalid client connecting from 89.237.37.122
[14:29:45] OnPlayerCommandText(Jhoe_Morello[140], /mapn)
[14:29:45] Invalid client connecting from 95.220.170.155
[14:29:45] Invalid client connecting from 81.163.125.228
[14:29:45] (1) Invalid client connecting from 92.127.123.100
[14:29:45] Invalid client connecting from 178.90.225.168
[14:29:45] OnPlayerCommandText(Jhoe_Morello[140], /map)
[14:29:45] Incoming connection: 37.214.125.171:28874
[14:29:45] [part] Anton_Alex has left the server (48:1)
[14:29:45] (1) Invalid client connecting from 93.84.35.150
[14:29:45] Invalid client connecting from 94.50.82.173
[14:29:45] Invalid client connecting from 178.168.47.164
[14:29:44] (1) Invalid client connecting from 83.149.19.171
[14:29:44] (1) Invalid client connecting from 109.227.232.16
[14:29:44] (1) Invalid client connecting from 178.93.83.99
[14:29:44] (1) Invalid client connecting from 178.213.4.253
[14:29:44] (1) Invalid client connecting from 188.232.220.49
[14:29:44] Invalid client connecting from 5.138.200.130
[14:29:44] Invalid client connecting from 46.0.133.79
[14:29:44] Invalid client connecting from 5.44.7.55
[14:29:44] Invalid client connecting from 178.94.115.207
[14:29:44] Invalid client connecting from 37.215.96.206
[14:29:44] (1) Invalid client connecting from 83.149.19.171
[14:29:44] (1) Invalid client connecting from 5.228.254.61
[14:29:44] (1) Invalid client connecting from 94.180.36.149
[14:29:44] (1) Invalid client connecting from 79.111.120.137
[14:29:44] (1) Invalid client connecting from 178.124.109.243
[14:29:44] (1) Invalid client connecting from 95.105.19.178
[14:29:44] (1) Invalid client connecting from 92.246.205.2
[14:29:44] (1) Invalid client connecting from 178.125.252.225
[14:29:43] (1) Invalid client connecting from 95.57.136.223
[14:29:42] (1) Invalid client connecting from 87.117.57.226
[14:29:42] (1) Invalid client connecting from 93.84.35.150
[14:29:42] (1) Invalid client connecting from 46.161.163.38
[14:29:42] (1) Invalid client connecting from 46.148.128.5
[14:29:42] (1) Invalid client connecting from 5.199.203.15
[14:29:42] (1) Invalid client connecting from 178.187.227.208
[14:29:42] [part] Miclouho_Makllay has left the server (139:1)
[14:29:42] (1) Invalid client connecting from 37.214.125.171
[14:29:42] (1) Invalid client connecting from 90.150.142.199
[14:29:42] (1) Invalid client connecting from 37.52.142.98
[14:29:42] Invalid client connecting from 92.127.123.100
[14:29:42] (1) Invalid client connecting from 178.67.109.93
[14:29:42] (1) Invalid client connecting from 92.127.225.110
[14:29:42] (1) Invalid client connecting from 176.213.108.136
Roll1nger is offline   Reply With Quote
Old 08/01/2014, 11:27 AM   #10455
Jon_De
High-roller
 
Join Date: Mar 2011
Location: ru
Posts: 1,246
Reputation: 21
Default Re: SA-MP 0.3x

Quote:
Originally Posted by Roll1nger View Post
Уже 5-ый день одна и та же фигня. Сервер зависает, но не выключается. Патч новый поставили, но ничего не изменилось.
Code:
[14:29:46] CONNECT: ID: 6 VERSIYA: 0.3x-R1-2
[14:29:46] Warning-Budko: Blocked attack from ID: 7
[14:29:46] [part] Antony_Shapovalov has left the server (7:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 14
[14:29:46] [part] Smith_Frutello has left the server (14:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 19
[14:29:46] [part] AleX_Chirkov has left the server (19:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 33
[14:29:46] [part] Diego_Barosi has left the server (33:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 35
[14:29:46] [part] Hell_energy has left the server (35:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 40
[14:29:46] [part] Diego_Ward has left the server (40:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 57
[14:29:46] [part] Trevor_Pozitiv has left the server (57:2)
[14:29:46] Warning-Budko: Blocked attack from ID: 64
[14:29:47] [part] Jack_Smith has left the server (64:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 79
[14:29:47] [part] Denis_Derpy has left the server (79:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 115
[14:29:47] [part] Cristopher_Silva has left the server (115:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 125
[14:29:47] [part] James_Carnewal has left the server (125:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 134
[14:29:47] [part] Roman_Yugay has left the server (134:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 140
[14:29:47] [part] Jhoe_Morello has left the server (140:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 144
[14:29:47] [part] Nikita_Shapovalov has left the server (144:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 148
[14:29:47] [part] Egor_Bobenok has left the server (148:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 150
[14:29:47] [part] Danil_Memorik has left the server (150:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 169
[14:29:47] [part] Jeff_Barosi has left the server (169:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 172
[14:29:47] [part] Evgeniy_Nadeinskiy has left the server (172:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 174
[14:29:47] [part] Diego_Martin has left the server (174:2)
[14:29:47] Warning-Budko: Blocked attack from ID: 179
[14:29:47] Incoming connection: 85.140.35.97:49836
[14:29:48] [part] Andrei_Red has left the server (179:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 185
[14:29:48] [part] Sergey_Kudryavcev has left the server (185:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 188
[14:29:48] [part] Denis_Sugou has left the server (188:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 195
[14:29:48] [part] Elkin_Elkin has left the server (195:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 198
[14:29:48] [part] Max_Vegas has left the server (198:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 199
[14:29:48] [part] Martin_Gudni has left the server (199:2)
[14:29:48] Warning-Budko: Blocked attack from ID: 204
[14:29:48] Incoming connection: 78.106.127.149:2439
[14:29:48] [part] zukaito has left the server (204:2)
[14:29:48] [part] Wiz_Knalifa has left the server (37:2)
[14:29:48] [debug] Run time error 4: "Array index out of bounds"
[14:29:48] [debug] Accessing element at negative index -1
[14:29:48] [debug] AMX backtrace:
[14:29:48] [debug] #0 0015fa34 in public GunReady (0x00000012) from 2.amx
[14:29:48] [debug] Run time error 4: "Array index out of bounds"
[14:29:48] [debug] Accessing element at negative index -1
[14:29:48] [debug] AMX backtrace:
[14:29:48] [debug] #0 0015fa34 in public GunReady (0x0000003f) from 2.amx
[14:29:45] (1) Invalid client connecting from 46.98.243.22
[14:29:45] (1) Invalid client connecting from 81.161.214.153
[14:29:45] [chat] [Martin_Gudni]: Сэр...
[14:29:45] (1) Invalid client connecting from 89.237.37.122
[14:29:45] OnPlayerCommandText(Jhoe_Morello[140], /mapn)
[14:29:45] Invalid client connecting from 95.220.170.155
[14:29:45] Invalid client connecting from 81.163.125.228
[14:29:45] (1) Invalid client connecting from 92.127.123.100
[14:29:45] Invalid client connecting from 178.90.225.168
[14:29:45] OnPlayerCommandText(Jhoe_Morello[140], /map)
[14:29:45] Incoming connection: 37.214.125.171:28874
[14:29:45] [part] Anton_Alex has left the server (48:1)
[14:29:45] (1) Invalid client connecting from 93.84.35.150
[14:29:45] Invalid client connecting from 94.50.82.173
[14:29:45] Invalid client connecting from 178.168.47.164
[14:29:44] (1) Invalid client connecting from 83.149.19.171
[14:29:44] (1) Invalid client connecting from 109.227.232.16
[14:29:44] (1) Invalid client connecting from 178.93.83.99
[14:29:44] (1) Invalid client connecting from 178.213.4.253
[14:29:44] (1) Invalid client connecting from 188.232.220.49
[14:29:44] Invalid client connecting from 5.138.200.130
[14:29:44] Invalid client connecting from 46.0.133.79
[14:29:44] Invalid client connecting from 5.44.7.55
[14:29:44] Invalid client connecting from 178.94.115.207
[14:29:44] Invalid client connecting from 37.215.96.206
[14:29:44] (1) Invalid client connecting from 83.149.19.171
[14:29:44] (1) Invalid client connecting from 5.228.254.61
[14:29:44] (1) Invalid client connecting from 94.180.36.149
[14:29:44] (1) Invalid client connecting from 79.111.120.137
[14:29:44] (1) Invalid client connecting from 178.124.109.243
[14:29:44] (1) Invalid client connecting from 95.105.19.178
[14:29:44] (1) Invalid client connecting from 92.246.205.2
[14:29:44] (1) Invalid client connecting from 178.125.252.225
[14:29:43] (1) Invalid client connecting from 95.57.136.223
[14:29:42] (1) Invalid client connecting from 87.117.57.226
[14:29:42] (1) Invalid client connecting from 93.84.35.150
[14:29:42] (1) Invalid client connecting from 46.161.163.38
[14:29:42] (1) Invalid client connecting from 46.148.128.5
[14:29:42] (1) Invalid client connecting from 5.199.203.15
[14:29:42] (1) Invalid client connecting from 178.187.227.208
[14:29:42] [part] Miclouho_Makllay has left the server (139:1)
[14:29:42] (1) Invalid client connecting from 37.214.125.171
[14:29:42] (1) Invalid client connecting from 90.150.142.199
[14:29:42] (1) Invalid client connecting from 37.52.142.98
[14:29:42] Invalid client connecting from 92.127.123.100
[14:29:42] (1) Invalid client connecting from 178.67.109.93
[14:29:42] (1) Invalid client connecting from 92.127.225.110
[14:29:42] (1) Invalid client connecting from 176.213.108.136
О, вместо того чтобы убрать старый флуд в лог, они добавили новый. Отлично. Onplayerdisconnect вызывается?
У тебя простых игроков кикает?
Jon_De is offline   Reply With Quote
Old 08/01/2014, 12:05 PM   #10456
Urukhay
Gangsta
 
Join Date: Sep 2013
Posts: 639
Reputation: 2
Default Re: Скриптинг курилка

Quote:
Originally Posted by Stepashka View Post
Нельзя обновлять поля с какого-то по какое-то, можно обновлять только сколько-то по какому-то условию. В твоем случае условия нет, т.е. все!
В добавок у тебя не указан порядок сортировки данных, поэтому не удивляйся если вдруг будут обновляться разные строки.
Тогда подскажите.. Мне надо обновить допустим только третью строку, как это сделать?
Urukhay is offline   Reply With Quote
Old 08/01/2014, 12:08 PM   #10457
k3dr
Big Clucker
 
k3dr's Avatar
 
Join Date: Oct 2013
Location: sudd3n
Posts: 129
Reputation: 0
Default Re: Скриптинг курилка

Quote:
Originally Posted by Urukhay View Post
Тогда подскажите.. Мне надо обновить допустим только третью строку, как это сделать?
Добавь столбец ID с AI , а в запросе используй WHERE `ID` = '%d'
__________________
k3dr is offline   Reply With Quote
Old 08/01/2014, 12:24 PM   #10458
Roll1nger
Little Clucker
 
Join Date: Jan 2014
Posts: 12
Reputation: 0
Default Re: SA-MP 0.3x

Quote:
Originally Posted by Jon_De View Post
О, вместо того чтобы убрать старый флуд в лог, они добавили новый. Отлично. Onplayerdisconnect вызывается?
У тебя простых игроков кикает?
Сервер зависает на одном онлайне и просто всех кикает. Он не выключен, показывает онлайн, допустим 210 / 500, но на серв не пускает и всех кикнул.
Roll1nger is offline   Reply With Quote
Old 08/01/2014, 12:26 PM   #10459
Flaks
Little Clucker
 
Join Date: Oct 2013
Posts: 11
Reputation: 0
Default Re: SA-MP 0.3x

Quote:
Originally Posted by Jon_De View Post
О, вместо того чтобы убрать старый флуд в лог, они добавили новый. Отлично. Onplayerdisconnect вызывается?
У тебя простых игроков кикает?
Was such a problem before.
FIX:
it is an attack, but the attack goes on almost any server.
Someone hangs, I know how to fix the problem with the crash, but the attack is not.
Flaks is offline   Reply With Quote
Old 08/01/2014, 12:31 PM   #10460
Roll1nger
Little Clucker
 
Join Date: Jan 2014
Posts: 12
Reputation: 0
Default Re: Скриптинг курилка

мб из-за этого что?
onplayerdisconnect:
SetTimerEx("KickPlayer",500,false,"d",playerid);

public KickPlayer(playerid)
{
Kick(playerid);
return true;
}
Roll1nger is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IRC-канал по скриптингу: #sa-mp.scripting.RU Zeex Русский/Russian 9 22/05/2015 03:24 AM
как понять кто убил и того кого убили? fooxid Русский/Russian 5 11/07/2010 06:21 PM
как разбить длинную строку? KPECTak Русский/Russian 14 08/06/2010 04:23 AM
Рускоязычные порталы по PAWN скриптингу isan Русский/Russian 15 21/03/2010 08:10 PM


All times are GMT. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.