Public DB temporarily offline

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: Public DB temporarily offline

Post by Slig » 20 Jul 2008 18:43

calsmurf2904 wrote:i get this error when it try's to update :

Code: Select all

[PHP Warning] call_user_func_array() : First argument is expected to be a valid callback, 'dedimania_newchallenge_cb'
was given on line 282 in file %pathtoasecofolder%\includes\xmlrpc_db.inc.php
does any1 knows how to fix this ?
Yes, you gave an object method name, not a function name ;)
For object method you don't give a string but an array($obj, 'myCallbackMethod'), see http://fr3.php.net/manual/en/language.p ... s.callback


More important, for all who make a Dedimania support :
- be sure to read http://dedimania.net:8012/Dedimania carefully, and that you undestand what kind of times are supported.
- make all needed checks in your client script to avoid sending wrong datas.
- don't use the same tool name than others, and change versions : it is mandatory to be able to trace which tool has sent which record in case of problem !
- please tell me when you do a dedimania client : i need to be able to contact you by PM or email if needed, also eventually i will open other server ports if needed.
Also, Dedimania is my server,and web_access.inc.php, xmlrpc_db.inc.php are my files. You can use them, but the minimum fairness is to ask/tell me before !...

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 20 Jul 2008 19:06

i am srry i didn't tell you ;)
i use as name ASECO...maybe i change it to ASECO_CALSMURF2904 ?
also :

Code: Select all

$callback = array('dedimania_newchallenge_cb', 0, $challenge);
$this->dedi_db['XmlrpcDB']->addRequest($callback,
               'dedimania.CurrentChallenge',
               $challenge->uid,
               $challenge->name,
               $challenge->environment,
               $challenge->author,
                              $this->getGame(),
               $aseco->server->gameinfo->mode,
               $serverinfo,
               $this->dedi_db['MaxRecords'],
               $players);
this code is used to send.....i does have an array as callback
Edit :
already fixed :)
i now use $callback = array(array($this,'dedimania_newchallenge_cb'), 0,$challenge);
Last edited by calsmurf2904 on 20 Jul 2008 19:30, edited 1 time in total.
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: Public DB temporarily offline

Post by Slig » 20 Jul 2008 19:28

calsmurf2904 wrote:i am srry i didn't tell you ;)
i use as name ASECO...maybe i change it to ASECO_CALSMURF2904 ?
too long ;)

Code: Select all

$callback = array('dedimania_newchallenge_cb', 0, $challenge);
$this->dedi_db['XmlrpcDB']->addRequest($callback,
               'dedimania.CurrentChallenge',
               $challenge->uid,
               $challenge->name,
               $challenge->environment,
               $challenge->author,
                              $this->getGame(),
               $aseco->server->gameinfo->mode,
               $serverinfo,
               $this->dedi_db['MaxRecords'],
               $players);
this code is used to send.....i does have an array as callback
no, your $callback is for addRequest, which use the first element as function name for call_user_func_array. But for an object method the function name is not a name but an array.

So, if $_PLUGIN is your DediMania object, something like :
$callback = array(array($_PLUGIN,'dedimania_newchallenge_cb'), 0, $challenge);

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 20 Jul 2008 19:51

it works...i already fixed it slig before you posted...see edit :P
i also edited fufi widgets so that it displays the records....the only thing i am not sure off is that if the player finish
and sets an new record that it is being showed in dedimania





PS : @the creator of fufi widgets....i will bring it out when it works good....to get the records you need to use $this->Aseco->getPlugin("DediMania")->dedi_db; instead of $dedi_db
(BTW what other name should i use then ?)
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: Public DB temporarily offline

Post by f*ckfish » 20 Jul 2008 22:44

calsmurf2904 wrote:PS : @the creator of fufi widgets....i will bring it out when it works good....to get the records you need to use $this->Aseco->getPlugin("DediMania")->dedi_db; instead of $dedi_db
(BTW what other name should i use then ?)
Just do your thing, I'll work it out as long as you keep the needed variables/fields public ;-)
inactive, sorry

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 21 Jul 2008 10:16

in the chat.dedimania.php file i tryed just $dedi_db because the variable is global but it doesn't work then because the variable is in an class....so you need to call them with that code.....maybe i am adding something like $aseco->dedimania so that it referres to the dedimania class.
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: Public DB temporarily offline

Post by f*ckfish » 21 Jul 2008 10:31

calsmurf2904 wrote:in the chat.dedimania.php file i tryed just $dedi_db because the variable is global but it doesn't work then because the variable is in an class....so you need to call them with that code.....maybe i am adding something like $aseco->dedimania so that it referres to the dedimania class.
No need to do that, I'll just call the Aseco->getPlugin stuff, that's what this method is for ;-) With my comment I just wanted you to know that you can feel free to write it in any way you like. As long as the data is somehow accessible from the outside, I'll get it =)
inactive, sorry

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: Public DB temporarily offline

Post by w1lla » 21 Jul 2008 10:33

Code: Select all

$this->Dedimania->dedi_db['Challenge']['Records'];
is how oliverde8 did it.

link of his status and minor changes by me:

http://www.tmnfvenray.nl/plugin.rar

edited link but it gives these errors:

Code: Select all

[07/21,14:54:12] currently no record on GimmeThatPunk
[07/21,14:54:12] XMLRPC Error [-1000] - Start index out of bound.
[07/21,14:54:17] Webaccess (dedimania.net:8007): send: deflate, receive: deflate
[07/21,14:54:17] XMLRPC Error [-502] - Not enough items in array
but it works overall verywell cause it doesnt give any errors for a restart.
Last edited by w1lla on 21 Jul 2008 12:54, edited 1 time in total.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

tchamba
cyclist
cyclist
Posts: 39
Joined: 06 Jul 2008 11:29
Owned TM-games: tmu
Location: France (28)

Re: Public DB temporarily offline

Post by tchamba » 21 Jul 2008 12:32

link of his status and minor changes by me:

http://www.tmnfvenray.nl/plugin.rar
Hello
I have just tried the plugins of the link
I receive this error message
"Fatal error : Fonction name must be a string in c:\serveurs\aseco\plugins\plugin.dedimania.php on line 323"

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 21 Jul 2008 12:56

w1lla wrote:

Code: Select all

$this->Dedimania->dedi_db['Challenge']['Records'];
is how oliverde8 did it.

link of his status and minor changes by me:

http://www.tmnfvenray.nl/plugin.rar

edited link but it gives these errors:

Code: Select all

[07/21,14:54:12] currently no record on GimmeThatPunk
[07/21,14:54:12] XMLRPC Error [-1000] - Start index out of bound.
[07/21,14:54:17] Webaccess (dedimania.net:8007): send: deflate, receive: deflate
[07/21,14:54:17] XMLRPC Error [-502] - Not enough items in array
but it works overall verywell cause it doesnt give any errors for a restart.
why do you get those errors....i have read the whole thread and you keep getting those errors....i don't get them and we used the same code to port :S
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: Public DB temporarily offline

Post by w1lla » 21 Jul 2008 13:31

mmm the problem is the track that gives the error.

however it works now for the moment so im pretty happy. ;) hope your version will work.

only problem might be the chat.dedimania.php

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 21 Jul 2008 14:28

my version works....the only problem is that i don't know how manialink windows work so i can't port chat.dedimania.php
it keeps saying error reading attributes or something about an end tag.
Maybe someone can help me with this ?
Edit :
this is the error :

Code: Select all

xmlrpc error [-1000] Invalid Manialink page: Error reading end tag.
Player Login=calsmurf2904
---- XML Begins
<manialinks><manialink posx="0.995" posy="0.745" id="0">
				<type>default</type>
				<format textsize="2" textcolor="000f" />
			    <background bgcolor="fff8" bgborderx="0.005" bgbordery="0.005" /><quad size='0.19 0.05' posn='0 -0.5' halign='left' valign='top' style='BgsPlayerCard' substyle='ProgressBar' action='1'/>
				<label textsize='2' textcolor='ffff' posn='0.8 -1' halign='left' valign='top' text='Welcome to...' /></manialink><manialink posx="0.76" posy="0.55" id="1">
				<type>default</type>
				<format textsize="2" textcolor="000f" />
			    <background bgcolor="0000" bgborderx="0.01" bgbordery="0.01" /><quad size='1.54 1.12' pos='0.01 0.01' halign='left' valign='top' style='Bgs1InRace' substyle='BgButtonBig' /><line height="0.06"><cell /></line><quad size="1.43 0.05" pos="0 0 -.05" halign="left" valign="top" style="Bgs1InRace" substyle="BgPager"/><label textsize="2" textcolor="ffff" pos="-0.025 -0.007 -.1" halign="left" valign="top" text="$oDediMania Records" /><quad size="0.04 0.04" pos="-1.47 -0.005 -.1" halign="right" valign="top" style="Icons64x64_1" substyle="ArrowUp" action="5"/><quad size="0.05 0.05" pos="-1.52 0 -.1" halign="right" valign="top" style="Icons64x64_1" substyle="Close" action="6"/><line><cell width='1.50'><text halign='center'>Record on DediMania</text></cell></line>
	<line height='0.05'>
	 <cell width='0.40' bgcolor='677E'><text halign='left'>Position</text></cell>
	 <cell width='0.88' bgcolor='677E'><text>Nickname</text></cell>
	 <cell width='0.61' bgcolor='677E'><text>Record</text></cell>
	</line>
	<line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>1</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$0a0xLo.$fffKluhtu</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:46.95</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>2</text></cell>
		<cell width='0.88' bgcolor='000E'><text>LoGι|记m</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.13</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>3</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$i$cccΛИΣ$bf3Mac$z$f80$wै$z$i$bf3 ツ</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.40</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>4</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$o$fc0ネ$912F4A$fc0ネ$i$fffΜลlten$912ै</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.51</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>5</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$I$n$f00gRs.$666Quist</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.56</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>6</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$i$999$oяѕя$ccc»$f00.$cccフoチive$f00"$9c0.A</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.57</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>7</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$i$fffinfantr$f33Y$fff.$fffsp$f33ו$fffke</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.58</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>8</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$s$fffR$000age</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.60</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>9</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$444[UMF]$fffjus@</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.63</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>10</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$f00$w$s°gOd°$w$i$s$f00J$CCCąrviS$z$n<CÐL></text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.68</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>11</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$s$o$fff»3m®«$09fL3genD</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.70</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>12</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$f00BB$fffKempshaw</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.72</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>13</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$l[www.x-roc.wz.cz]$777א-®Θ©$l$f93 =유+유</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.73</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>14</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$i$393яαѕिα*$000$l[team-rasta.c.la]τιτgυς</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.74</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>15</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$s$w$o$f00ÇŞŖ*$fffĦ$ff0๏$fffŗŗ๔๖$f0fเ$fffท</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.75</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>16</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$i$fffeLƒ$0ff/$999Ťąřąŋťũłą</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.79</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>17</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$fffギ$777w$fff! $c00厶$fff丫$c00兰$fff*$000Kムし</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.80</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>18</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$fff»ηωσ« $f00ktd</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.80</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>19</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$W$I$O$fffᄽ$660ρ$l[tm-forum]ᄋ$z$W$O$660Ҡ$fffᄿ</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.81</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>20</text></cell>
		<cell width='0.88' bgcolor='000E'><text>vampire_xxz</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.85</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>21</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$o$fffΗαωκ$f93Ġєя</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.85</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>22</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$fff$l[www.nfg-team.cz]NFG$f00ֻŞєйσя-</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.86</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>23</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$i$f80n!$777Seasonic$f80|$fffMunkeholm</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.88</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>24</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$s$fff$l[www.nfg-team.cz]NFG$l $f00Lupus</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.89</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>25</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$fffи$f00Ø$fffŧз</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.95</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>26</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$i$f63wX$fff.Robi</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.96</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>27</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$777א-®Θ© $c00=$000유$222+$a00유</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.98</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>28</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$L[http://tinyurl.com/54v7pa]$o$wL$f80A$f00N</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:47.99</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>29</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$f61OLD*$w$6c3Berny$000B$f61O$000Y  d:-I°</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:48.00</text></cell>	
		</line><line height='0.043'>
		<cell width='0.40' bgcolor='000E'><text halign='right'>30</text></cell>
		<cell width='0.88' bgcolor='000E'><text>$w$393*яα$fc0ѕ$c00िα$fff*$o$6c0мѧѕѕѧсяэ$fff*</text></cell>
		<cell width='0.61' bgcolor='000E'><text>$88800:48.02</text></cell>	
		</line></manialink><manialink posx="1" posy="0.57" id="5">
				<type>default</type>
				<format textsize="1" textcolor="000f" />
			    <background bgcolor="fffb" bgborderx="0.01" bgbordery="0.01" /><quad halign="left" pos=".3 0" size=".55 .05" style="Bgs1InRace" substyle="BgButtonBig" />
	    <label textsize="1" textcolor="000" pos="-.08 -.015 -.11" halign="left" valign="top" text="Admin Bar" /><quad size=".06 .03" pos="0 -.01 -.1" halign="left" valign="top" style="BgsPlayerCard" substyle="BgActivePlayerCard" action="3" />
	    <label textsize="1" textcolor="000" pos="-.017 -.015 -.11" halign="left" valign="top" text=">>" /></manialink></manialinks>
---- XML Ends
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: Public DB temporarily offline

Post by w1lla » 21 Jul 2008 15:29

well i can/want to help you but, i don't understand what command you use. My only problem of the chat plugin are the:

Code: Select all

			$head = 'Current TOP ' . $this->Dedimania->dedi_db['MaxRecords'] . ' Dedimania Records:';
			$msg = array();
			$lines = 0;
			$player->msgs = array();
			// reserve extra width for $w tags
			//$extra = ($aseco->settings['lists_colornicks'] ? 0.2 : 0);
			$player->msgs[0] = array(1, $head, array(0.8+$extra, 0.1, 0.45+$extra, 0.25));
			// create list of records
			if ($total = count($dedi_recs)) {
				for ($i = 0; $i < $total; $i++) {
					$cur_record = $dedi_recs[$i];
					$nick = $cur_record['NickName'];
					$nick = stripFormatting($nick);
					$msg[] = array(str_pad($i+1, 2, '0', STR_PAD_LEFT) . '.',
					               '' . $nick,
					               ($cur_record['NewBest'] ? '': '') .
					               ($aseco->server->gameinfo->mode == 4 ?
					                $cur_record['Best'] : formatTime($cur_record['Best'])));
					$lines++;
					if ($lines > 14) {
						$player->msgs[] = $msg;
						$lines = 0;
						$msg = array();

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Public DB temporarily offline

Post by calsmurf2904 » 21 Jul 2008 15:34

i am trying to port the /dedirecs command...
the code is :

Code: Select all

function chat_dedirecs($command) {
$aseco = $this->Aseco;
	global $dedi_db;

	$player = $command['author'];
	$dedi_recs = $aseco->getPlugin("DediMania")->dedi_db['Challenge']['Records'];

	// display popup window for TMN
	if ($this->Aseco->getPlugin("DediMania")->getGame() == 'TMN') {
				$head = 'Current TOP ' . $aseco->getPlugin("DediMania")->dedi_db['MaxRecords'] . ' Dedimania Records:' . LF;
		$msg = '';
		$lines = 0;
		$player->msgs = array();
		$player->msgs[0] = 1;
		// create list of records
		if ($total = count($dedi_recs)) {
			for ($i = 0; $i < $total; $i++) {
				$cur_record = $dedi_recs[$i];
				$nick = $cur_record['NickName'];
				if (!$aseco->settings['lists_colornicks'])
					$nick = stripColors($nick);
				$msg .= str_pad($i+1, 2, '0', STR_PAD_LEFT) . '.  {#black}'
				        . str_pad($nick, 20) . '$z - '
				        . ($cur_record['NewBest'] ? '{#black}': '')
				        . formatTime($cur_record['Best']) . LF;
				$lines++;
				if ($lines > 9) {
					$player->msgs[] = $aseco->formatColors($head . $msg);
					$lines = 0;
					$msg = '';
				}
			}
			// add if last batch exists
			if ($msg != '') {
				$player->msgs[] = $aseco->formatColors($head . $msg);
			}
			// display popup message
			if (count($player->msgs) == 2) {
				$aseco->client->query('SendDisplayServerMessageToLogin', $player->login, $player->msgs[1], 'OK', '', 0);
			} else {  // > 2
				$aseco->client->query('SendDisplayServerMessageToLogin', $player->login, $player->msgs[1], 'Close', 'Next', 0);
			}
		} else {
			$aseco->client->query('ChatSendServerMessageToLogin', $aseco->formatColors('{#server}> {#error}No Dedimania records found!'), $player->login);
		}

	// display ManiaLink window for TMF
	} elseif ($this->Aseco->getPlugin("DediMania")->getGame() == 'TMF') {
		$lines = 0;
		$header = '<frame pos="0 0 0.5">
                       <quad pos="0 0 -0.5" size="1.47 0.09" halign="left" style="BgsPlayerCard" substyle="BgPlayerName"/>
                       <label pos="-.5 -0.05 -0.75" size="1.26 0.07" halign="center" style="TextTitle3" text="Top '.$aseco->getPlugin("DediMania")->dedi_db['MaxRecords'].' Dedimania Records"/>
                       <line><cell width="1.50"><text halign="center">Record on DediMania</text></cell></line>
                       <line height="0.05">
	                 <cell width="0.40" bgcolor="677E"><text halign="left">Position</text></cell>
	                 <cell width="0.88" bgcolor="677E"><text>Nickname</text></cell>
	                 <cell width="0.61" bgcolor="677E"><text>Record</text></cell>
	                 </line>
	                ';
  
		$detail = "<line height='0.043'>
		<cell width='0.40' {ROW_COLOR}><text halign='right'>{POSITION}</text></cell>
		<cell width='0.88' {ROW_COLOR}><text>{NICKNAME}</text></cell>
		<cell width='0.61' {ROW_COLOR}><text>\$888{RECORD}</text></cell>	
		</line>";
 
            $footer = "</quad></frame>";
$middle = "";
$row_color='bgcolor=\'000E\'';
		// create list of records
		if ($total = count($dedi_recs)) {
			for ($i = 0; $i < $total; $i++) {
				$cur_record = $dedi_recs[$i];
				$nick = $cur_record['NickName'];
					$nick = $nick;
//$message .= str_pad($i+1, 2, '0', STR_PAD_LEFT) . '.',
//				               $nick,
//				               ($cur_record['NewBest'] ? '': '') .
//				               ($aseco->server->gameinfo->mode == 4 ?
//				                $cur_record['Best'] : formatTime($cur_record['Best']));
$mess = "";
$mess = str_replace('{ROW_COLOR}', $row_color, $detail);
$mess = str_replace('{POSITION}', $i+1 , $mess);
$mess = str_replace('{NICKNAME}', $nick , $mess);
$mess = str_replace('{RECORD}', formatTime($cur_record['Best']), $mess);
$middle .= $mess;
$lines++;
			}
$content = $middle;
$window = $this->createWindowToPlayerFramework('DediMania Records',1.52,1.1,$player);
$window->setContent($header.$content.$footer);
		} else {
			$aseco->client->query('ChatSendServerMessageToLogin', $aseco->formatColors('{#server}> {#error}No Dedimania records found!'), $player->login);
		}

	// show chat message for TMO & TMS
	} else {
		$msg = $aseco->formatColors("{#server}> Current TOP 4 Dedimania Records:{#highlite}");
		$top = 4;

		// create list of records
		if ($total = count($dedi_recs)) {
			$total = ($total <= $top ? $total : $top);
			for ($i = 0; $i < $total; $i++) {
				$cur_record = $dedi_recs[$i];
				$msg .= LF . ($i+1) . '. ' . str_pad($cur_record['NickName'], 15)
				        . ' - ' . formatTime($cur_record['Best']);
			}
		} else {
			$msg = $aseco->formatColors('{#server}> {#error}No Dedimania records found!');
		}
		// show chat message
		$aseco->client->query('ChatSendServerMessageToLogin', $msg, $player->login);
	}
}  // chat_dedirecs
the fault is in the TMF code
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: Public DB temporarily offline

Post by w1lla » 21 Jul 2008 15:38

can you pm me the codes off all 3 plugins so i can understand. .lol. weare working on 2 different versions why not one.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

Post Reply