String formatted incorrectly - parameter 5 (total 4)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
271
Реакции
43
Помог
5 раз(а)
Ошибка
L 12/28/2019 - 11:12:44: Info (map "de_dust2x2") (file "addons/amxmodx/logs/error_20191228.log")
L 12/28/2019 - 11:12:44: String formatted incorrectly - parameter 5 (total 4)
L 12/28/2019 - 11:12:44: [AMXX] Displaying debug trace (plugin "fb_fowards.amxx", version "0.3")
L 12/28/2019 - 11:12:44: [AMXX] Run time error 25: parameter error
L 12/28/2019 - 11:12:44: [AMXX] [0] fb_fowards.sma::show (line 42)
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5384 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 21 2019 02:50:07
Built from: https://github.com/alliedmodders/amxmodx/commit/5120dea
Build ID: 5384:5120dea
Core mode: JIT+ASM32
Билд
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.692-dev
Build date: 18:58:01 Sep 21 2019 (1988)
Build from: https://github.com/dreamstalker/rehlds/commit/e7232be
ReGamedll
ReGameDLL version: 5.13.0.433-dev
Build date: 12:36:26 Dec 25 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7b0dab9
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.135 ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5384 ini Start ANY
[ 3] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 4] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 5] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC4 ini ANY ANY
[ 9] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[10] ReAPI RUN - reapi_amxx_i386.so v5.12.0.192-dev pl2 ANY Never
[11] MySQL RUN - mysql_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[15] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[16] CSX RUN - csx_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[17] Engine RUN - engine_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
[18] Fun RUN - fun_amxx_i386.so v1.10.0.5384 pl2 ANY ANY
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Loader 3.5 neygomon admin_loader_3_ running
[ 2] FreshBans 1.4.3b kanagava fresh_bans_143_ running
[ 3] Ban Sound: Fresh Bans 1.1 Leo_[BH] fb_ban_sound_fi running
[ 4] DopBan 3.0.3b kanagava dop_ban303_.amx running
[ 5] fb_forwards 0.3 kanagava + Spiel fb_fowards.amxx debug
[ 6] Fake Ping 1.1 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 7] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 8] Ultimate Chats Control 5.2(c) neygomon ucc2.amxx running
[ 9] Advert Messages 1.22 neygomon adverts.amxx running
[ 10] Admin Commands 1.10.0.525 AMXX Dev Team admincmd.amxx running
[ 11] Multi-Lingual System 1.10.0.525 AMXX Dev Team multilingual.am running
[ 12] Menus Front-End 1.9.0.5232 AMXX Dev Team menufrontv2_cli running
[ 13] Commands Menu 1.10.0.525 AMXX Dev Team cmdmenu.amxx running
[ 14] Players Menu 1.10.0.525 AMXX Dev Team plmenu.amxx running
Автор плагина
kanagava + Spieler
Версия плагина
0.3
Исходный код
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "fb_forwards"
#define VERSION "0.3"
#define AUTHOR "kanagava + Spieler"


forward fbans_player_banned_pre(id, userid)
forward amxbans_player_banned(id, bid)
forward fbans_player_banned_post(id, userid, bid)


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}

public fbans_player_banned_pre(id, userid)
{
server_cmd("amx_screen #%d 3", userid)
}

public amxbans_player_banned(id, bid)
{

static data[1]
data[0] = bid
set_task(3.0, "show", id, data, 1) //
}

public fbans_player_banned_post(id, userid, bid)
{
//
}

public show(data[], id)
{
if(is_user_connected(id))
{
static url[128]
formatex(url, 127, "http://dev-cs.ru/ban/motd.php?sid=%s&adm=%d&lang=%s", data[0]) /// (line 42)
show_motd( id, url, "You are banned")
}
}

public client_disconnected(id) remove_task(id)
error because url has %s %d %s ?
maybe data[2] ? :)
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Murz, because you haven't specified the other values.
 
  • Нравится
Реакции: Ayk
Сообщения
1,304
Реакции
2,303
Помог
57 раз(а)
Последнее редактирование:
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Murz, I have no idea what you want to put there.

You only put data[0] that equals to ID of the ban (data[0] = bid) so in your link:
ban/motd.php?sid=%s&adm=%d&lang=%s
The first %s: sid=%s will be replaced by the ID of the ban. For example: ban/motd.php?sid=2934&adm=%d&lang=%s

But you still need to replace the other values. I don't know what they mean. Maybe 'adm' is the ID of admin who banned the player and 'lang' is the lang that player is using (ru, en...).
 
Сообщения
271
Реакции
43
Помог
5 раз(а)
hm, i am using cs bans 1.3 so its in russian i faund that in cs net ua in fresh bans theme
29 Дек 2019
parmin sliskom tezalo eto vsio teres google transleitor perevesti ja etot plagin nasol cs net ua fresh bans teme
Код:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "fb_forwards"
#define VERSION "0.2"
#define AUTHOR "kanagava +  Spieler"
 
 
forward fbans_player_banned_pre(id, userid)
forward amxbans_player_banned(id, bid)
forward fbans_player_banned_post(id, userid, bid)
 
 
public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
}
 
public fbans_player_banned_pre(id, userid)
{
   server_cmd("amx_screen #%d 3", userid)
}
 
public amxbans_player_banned(id, bid)
{
   static url[128]
   formatex(url, 127, "http://dev cs ru/ban/motd.php?sid=_%d&adm=0&lang=ru", bid)
   show_motd(id, url, "You are banned")
}
 
public fbans_player_banned_post(id, userid, bid)
{
   // тут ничего не делаем вроде как :)
}
ranija versija rabotajet no motd srazu atkrivajet taksto ss motd snemajet esli netrudno pomagiti :D
 
Сообщения
1,304
Реакции
2,303
Помог
57 раз(а)
Код:
-formatex(url, 127, "http://dev-cs.ru/ban/motd.php?sid=%s&adm=%d&lang=%s", data[0]) /// (line 42)
+formatex(url, 127, "http://dev-cs.ru/ban/motd.php?sid=%d&adm=0&lang=ru", data[0])
 
Сообщения
271
Реакции
43
Помог
5 раз(а)
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.

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

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу