#arianne IRC Log

Index

IRC Log for 2009-04-26

Timestamps are in GMT/BST.

[0:08] * neoneurone (n=chatzill@shm67-4-82-242-215-135.fbx.proxad.net) Quit (Remote closed the connection)
[1:55] * DensFisendi (n=Deus@77.134.126.176) has joined #arianne
[2:11] * DeusFigendi (n=Deus@BAG936d.bag.pppool.de) Quit (Read error: 110 (Connection timed out))
[2:21] <postman-bot> DADDYS_GIRL rented a sign saying "watz up peeps"
[2:25] <postman-bot> blacklads rented a sign saying "not muuuuuuuuch :D good morning ;)"
[2:54] <postman-bot> DADDYS_GIRL rented a sign saying "u like the song I love collage"
[3:00] * Bluelads4 (i=5084c0dd@gateway/web/ajax/mibbit.com/x-b2b3de3ee2fd0d3b) Quit ("http://www.mibbit.com ajax IRC Client")
[3:22] * DensFisendi is now known as DeusFigendi
[3:27] * madmetzger (n=markus@p5B03E951.dip.t-dialin.net) has joined #arianne
[3:45] * madmetzger_afk (n=markus@p5B03F6F9.dip.t-dialin.net) Quit (Read error: 110 (Connection timed out))
[9:36] * kymara (n=katie@afrodite.yok.utu.fi) has joined #arianne
[10:09] <kymara> [21:23] <kymara> there was the big warning about it being wrong and it would be fixed, which you put there. I'm not pointing fingers at all, but if you plan not to fix it i think it'd make things look tidier to remove the message and remove the parts relating to it. what do other people think?
[10:09] <kymara> [21:23] <kymara> (I'm talking about what you see at the top of http://stendhal.game-host.org/?id=content/game/creatures for exmaple about rat killed 0 times, and on the pages for each creature and each player)
[10:09] <kymara> noone replied.
[10:11] <kymara> work is not being done on this and the author of the comments doesnt plan to fix it. i can try allowing it and seeing what load that places on server now that the game events table is a lot smaller. or i will just remove the bogus material completely. i object to having stuff lying around which is broken, which we say we know is broken, but which nothing happens about. i asked for other comments and noone replied, perhaps people didn't see it, so here
[10:13] <kymara> i would just make it 'work' using the old original design now that game events table is a lot smaller and try to see if it has a bad impact on the server but i dont know what to look for - lag? bandwidth? some heavy use of db because of the polls?
[10:34] <CIA-50> arianne_rpg: kymara * stendhal_website/scripts/website.php: ONLY show the known bug notice about deaths IF we have the switch 'please make it fast' set false (why was the switch even made if it's not used where it would actually be useful!!!!)
[10:35] <kymara> i'll try making it show. the pages load a bit slower i think but it hasn't seemed to impact on game performance
[10:41] <CIA-50> arianne_rpg: kymara * stendhal_website/content/game/creatures.php: make killed data of creatures clear that it's only recent data (since last game events table backup, in fact)
[11:05] <CIA-50> arianne_rpg: kymara * stendhal_website/content/ (3 files in 2 dirs): move the best killer and most killed boxes to the killed stats page for creatures not the creature info page
[11:15] <mblanch> So?
[11:16] <mblanch> I think it is a bit more slower ( pages load for me in 3-4 seconds while they used to do in 2 )
[11:16] <mblanch> Is the lag for game noticiable?
[11:25] <kymara> please define lag. turn overflows?
[11:26] <kymara> if thats what you meant i see none in logs
[11:27] <kymara> next i'm working on the bar graphs on the individual creature pages - they aren't labelled to say whats being displayed
[11:27] <kymara> (its kills per day, according to the code)
[11:28] <kymara> and the most recent day is to the far left - one would expect right - so i'll try fix that or label it somehow better
[11:56] <kymara> bbl¨
[12:38] * Mein_Dino (n=fkdjgs@91-66-89-160-dynip.superkabel.de) has joined #arianne
[14:15] * madmetzger1 (n=markus@p5B03BF13.dip.t-dialin.net) has joined #arianne
[14:18] * yoriy (n=opera@81.16.113.174) has joined #arianne
[14:33] * madmetzger (n=markus@p5B03E951.dip.t-dialin.net) Quit (Read error: 110 (Connection timed out))
[14:39] * Ci-Dev (n=ci-dev@p54BDE806.dip.t-dialin.net) has joined #arianne
[14:54] <Ci-Dev> What the unit of the abscissa for the stats on the website?
[14:54] <Ci-Dev> Is it hours?
[14:54] <Ci-Dev> 15 hours into the past? Or 15 days?
[15:14] <kymara> i'm working on showing it better atm
[15:15] <kymara> its really poorly done
[15:15] <kymara> the number is the height
[15:15] <kymara> which i have changed to now display at the top of bar as it should be
[15:15] <kymara> each column is one day
[15:16] <kymara> the height is the number of times killed
[15:16] <kymara> today is the column to the far left (which imho is reverse of what it should be)
[15:16] <kymara> i am currently trying to fix all these and add the date value to the x axis
[15:17] <kymara> (note i'm no php expert at all, but i've got the number to the top and am just now revesrsing the order. it's in that order from the query, really)
[15:27] <Ci-Dev> Oh.
[15:27] <Ci-Dev> I am good at PHP.
[15:27] <Ci-Dev> The source is somewhere in CVS?
[15:27] <CIA-50> arianne_rpg: kymara * stendhal_website/bargraph.php:
[15:27] <CIA-50> arianne_rpg: put number (height of column) hovering above bar instead of below it, as by convention numbers on x axis are x axis data whereas this is a height (y axis data). above the bar or on bar
[15:27] <CIA-50> arianne_rpg: itself is usual convention. make it so most recent day (usually today) is on far right instead of left which is more intuitive, data going -> along x axis should be increasing.
[15:28] <Ci-Dev> There we go. Le's have a look there...
[15:31] <kymara> please be patient till ihave updated website itself thank you
[15:31] <CIA-50> arianne_rpg: kymara * stendhal_website/bargraph.php: correct overwrapped comment line
[15:32] <CIA-50> arianne_rpg: kymara * stendhal_website/content/scripts/monster.php: add 'per day' to title of graph at least until the date data is added
[15:43] * erdnuggel (n=blub@p5DD42CF6.dip.t-dialin.net) has joined #arianne
[16:12] <yoriy> kymara: Liliana cant return me back my outfit, so i just buyed another, and now have to wait 2 days.
[16:18] <yoriy> but i checked, that /DeepInspect.class shows outfit number :-)
[16:20] <kymara> your current outfit number
[16:20] <kymara> how is that useful info, and anyway i could tell you that by going to website
[16:20] <kymara> buying another may not help you. she may save your current outfit (with glasses) and then it doesnät get returned
[16:21] <kymara> in fact i have a feeling that may be what happened to you before, if you already had a bought face then you bought those glasses?
[16:21] <kymara> anyway, i dont see how deep inspect would help. it would tell me your current outfit and i could tell that number from looking at you
[16:22] <kymara> or from looking at the website
[16:22] <kymara> it'd be nice if you could say what face it is you think went missing. i assume you checked all three i sent you which had blue eyes and it was none of them? do you have a screen shot maybe?
[16:26] <kymara> no heads have been removed from the set outfit menu, and no heads have been changed or removed from cvs who had number less than 21 (those were all those available on set outfit menu before). the last change of them was almost 2 years ago. are you really sure you are remembering the old face correctly?
[16:29] <yoriy> it is even worse then i thinked :-(
[16:30] <yoriy> i have only one choice - i need to get old cvs branch
[16:30] <yoriy> i remember, then i started at 0.65 version
[16:31] <kymara> please stop jumping to such massive conclusions
[16:31] <kymara> what client are you using atm
[16:31] <kymara> and you haven't even tried other options like a GM /alter your outfit and see if it goes back to normal
[16:32] <kymara> i did offer you that
[16:32] <yoriy> yes, but you shows me other faces
[16:32] <yoriy> not mine
[16:33] <kymara> a gm could alter your outfit to not be a special one
[16:33] <kymara> then you can see if there is some difference
[16:33] <kymara> at first you told me you dont see any face at all
[16:33] <kymara> then you said, there are options but not my old one
[16:33] <kymara> and you still aren't describing your old one
[16:34] <kymara> have you checked the data/sprites/outfit directory to see it there?
[16:34] <yoriy> it is hard to me, explain this
[16:34] <yoriy> i will look it it
[16:34] * Bluelads4 (i=5084f5b3@gateway/web/ajax/mibbit.com/x-3fdaccaea7d7aa3d) has joined #arianne
[16:35] <kymara> are you sure it isnt this one
[16:35] <kymara> http://arianne.cvs.sourceforge.net/viewvc/*checkout*/arianne/stendhal/data/sprites/outfit/head_13.png?revision=1.1
[16:35] <kymara> why dont you think its that
[16:35] <kymara> what is the difference between what you had, and this
[16:35] <kymara> http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/data/sprites/outfit/head_18.png is it this one?
[16:36] <yoriy> first face, is not mine again :-) difference is mouth
[16:36] <kymara> there's a mouth in the second one i sent
[16:37] <kymara> and i showed you another with mouth i think, but blinking eyes, in game
[16:39] <Bluelads4> isn't it that one here yoriy? http://stendhal.game-host.org/?id=content/scripts/character&name=Redlads5
[16:39] <kymara> he says no as that doesnt have a mouth
[16:39] <yoriy> similar, but still other
[16:39] <kymara> and the one i sent with mouths di dyou look at it??
[16:39] <yoriy> now im looking at sprites
[16:39] <Bluelads4> with lipstick?
[16:39] <kymara> like http://stendhal.game-host.org/createoutfit.php?outfit=10182907 (though i already sent that head as just the head)
[16:40] <Bluelads4> that's the one I meant :D
[16:40] <yoriy> no, kym. lips is other
[16:40] <kymara> yes i sent it earlier to him, the second one i sent
[16:41] <kymara> and its not the one with mouth but blnking eyes?
[16:41] <kymara> http://stendhal.game-host.org/createoutfit.php?outfit=10152907
[16:41] <yoriy> yes
[16:41] <yoriy> it is
[16:41] <kymara> i sent you that earlier in game and you said it wasnt
[16:41] <kymara> :7
[16:42] <yoriy> really?
[16:42] <yoriy> ohhh
[16:42] <kymara> well thats number 15 and its definitely selectable
[16:42] <kymara> between the brown eyes and the one with really heavy green above the lids
[16:42] <kymara> in the picture where you select it the eyes are more shut
[16:42] <Bluelads4> yes it is
[16:44] <yoriy> yes, thanx you both, kym and Blue :-)
[16:44] <Bluelads4> well I didn't do anything :D
[16:44] <yoriy> except you taked part in my problems :-)
[16:53] <kymara> so Ci-Dev are you good at php do you want to talk me through a particular function?
[16:55] <CIA-50> arianne_rpg: kymara * stendhal/src/games/stendhal/server/core/rp/StendhalQuestSystem.java: remove bunny from main head as well as branch (which was done before)
[17:07] * Mein_Dino (n=fkdjgs@91-66-89-160-dynip.superkabel.de) Quit ()
[17:42] * Disconnected.
[17:42] -NickServ- This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.
[17:42] * _eye_fill_in (n=PircBot@c188108.adsl.hansenet.de) has joined #arianne
[17:42] * Topic is 'Stendhal 0.73 and Marauroa 2.6.1 released: http://arianne.sourceforge.net/?arianne_url=games/game_stendhal#downloadsection][ public server: http://stendhal.game-host.org ][ want to chat?: /join #arianne-chat ] [ ANY QUESTIONS?: Just ask them and stick around in the channel, maybe an answer will pop up later ]'
[17:42] * Set by kymara on Tue Mar 31 18:35:38 CEST 2009
[17:42] <Ci-Dev> Yes, correct.
[17:42] [freenode-connect VERSION]
[17:42] <kymara> awesome!
[17:42] <Ci-Dev> So two possibilities,
[17:42] <Ci-Dev> either make MySQL give you day, month, year,
[17:42] <Ci-Dev> or make PHP get your day and month from that number.
[17:42] <kymara> ok
[17:42] <kymara> that is good
[17:42] <Ci-Dev> Though, due to 29th February, you it might not be easy.
[17:42] <kymara> yay
[17:43] <Ci-Dev> So easiest is by SQL
[17:43] <kymara> ok
[17:43] <kymara> yes cos timedate is practically already there
[17:43] <Ci-Dev> It is MySQL, isn't it?
[17:43] <kymara> would dayofyear(timedate) be a sql function?
[17:43] <kymara> yes
[17:43] * Bluelads4 (i=5084f5b3@gateway/web/ajax/mibbit.com/x-3fdaccaea7d7aa3d) has left #arianne
[17:43] <Ci-Dev> It is.
[17:43] <Ci-Dev> Give me a moment.
[17:43] <kymara> for the graph i was thinking that showing DD/MM is ideal
[17:43] <kymara> as it's always last 14 days only
[17:44] <Ci-Dev> I perfer -MM-DD according to ISO 8601
[17:44] <kymara> ok
[17:45] <kymara> either is ok i'm just english
[17:46] <Ci-Dev> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
[17:47] <Ci-Dev> select dayofmonth(timedate) as day, month(timedate) as month, count(*) as amount from gameEvents where ... group by day, month
[17:47] <Ci-Dev> And depending on how the data fetching works,
[17:48] <Ci-Dev> you might want to add an "ORDER BY month ASC, day ASC" as well.
[17:48] <Ci-Dev> Ha, or even better, if you do not want to do any calculations,
[17:48] <Ci-Dev> let MySQL do everything.
[17:50] <Ci-Dev> select date_format(timedate, "-%m-%d") as day, count(*) as amount from gameEvents where ... group by day
[17:50] <Ci-Dev> kymara: That one.
[17:50] <Ci-Dev> You then get a nicely formatted date in "day".
[17:52] <yoriy> about day and time functions :-) kym, you told me that there is info about server uptime on web-site, but i cant find it, only server time :-)
[17:53] <kymara> yoriy check detailed stats under the thing saying how many players online
[17:53] <kymara> (very small writing, as test for people with poor eyesight i think :P )
[17:54] <kymara> sorry ci dev i was juust cooking dinner let me read what you wrote
[17:54] <yoriy> ok, found it :-) thanx :-)
[17:54] <kymara> yw
[17:58] <kymara> ci dev that does look good but the array dump shows the same as before
[17:58] <kymara> it might be this, its like itäs not bothering to put the day itself that we just got into the array?
[17:58] <kymara> $base=date('z')+1;
[17:58] <kymara> for($i=0;$i<$numberOfDays;$i++) {
[17:58] <kymara> $this->kills[$base-$i]=0;
[17:58] <kymara> }
[17:58] <kymara> am i right? i'd like to tell you what 'z' is but i am afraid i dont know
[18:02] <kymara> oh maybe not because then there's $this->kills[$row['day']]=$row['amount'];
[18:02] <kymara> after it anyway
[18:02] <kymara> right, i better go eat dinner though - i'll bll if i dont see you then then thanks for help
[18:27] <Ci-Dev> kymara: http://php.net/date
[18:28] <Ci-Dev> 'z' = day of the year
[18:29] <yoriy> look at this: http://stendhal.game-host.org/?id=content%2Fscripts%2Fcharacter&name=yoriy&search=Search
[18:29] <yoriy> something really wrong here :-)
[18:30] <Ci-Dev> kymara: Okay, I now found the function you are talking about.
[18:32] <Ci-Dev> And there is a off-by-one bug in there too.
[18:32] <Ci-Dev> It is supposed to give out 14 days and not 15.
[18:33] <Ci-Dev> datediff(now(),timedate)<='.$numberOfDays.'
[18:33] <Ci-Dev> That one should be "<"
[18:34] <Ci-Dev> Hm. It all depends on the definition of "numberOfDays" whether it is including today or excluding today.
[18:37] <Ci-Dev> Okay, this isn't very trivial, because SQL cannot fetch data it doesn't have.
[18:37] <Ci-Dev> So if there was one day without any kills, that day would "silently" be skipped.
[18:39] <Ci-Dev> I believe the best way is to return the day is number of days into the past based on today.
[18:40] <Ci-Dev> And then get the day/month using PHP.
[18:42] <Ci-Dev> Seems as if I cannot reach a pastebin.
[18:44] * yoriy (n=opera@81.16.113.174) has left #arianne
[18:49] <kymara> i usually use pastebin.ca despite not being in canada
[18:49] <Ci-Dev> Doesn't work for me right now.
[18:49] <kymara> what is wrong yoriy?
[18:50] <kymara> the sword?
[18:50] <Ci-Dev> kymara: Can you do a diff yourself?
[18:50] <kymara> i think its expecting a shield
[18:50] <Ci-Dev> Or should I do a patch?
[18:50] <kymara> i can make diffs
[18:50] <Ci-Dev> Okay.
[18:52] <Ci-Dev> $day now is the offset to today.
[18:53] <Ci-Dev> The server is running on UTC and the timezone for PHP/webserver is UTC as well?
[18:53] <Ci-Dev> And the dates in database are in UTC too?
[18:53] * kymara hides
[18:53] <kymara> um
[18:53] <kymara> the dates in db match server
[18:54] <kymara> and it's ''german time''
[18:54] <Ci-Dev> /info gives date in CET/CEST.
[18:54] <kymara> right now i'm testing on finnish time
[18:54] <kymara> but thats ok
[18:54] <kymara> i see that the offset is today cos now it shows 0 in my dump
[18:54] <kymara> for today
[18:54] <kymara> so thats good
[18:54] <Ci-Dev> So in order to get the proper day, you have to do
[18:55] <Ci-Dev> date('-m-d', time() - $day * 86400);
[18:55] <Ci-Dev> ...inside the $data loop.
[18:55] <kymara> i should commit that bugfix in the file you sent though first
[18:55] <Ci-Dev> It still is flawed.
[18:55] <kymara> it was, to fix the bug about number of days, 14 not 15, and that days with no kills were silently skipped ?
[18:56] <Ci-Dev> Simple "overflow" issue when year changes.
[18:56] <kymara> hm
[18:56] <kymara> i can back up game events at mignight on 31st dec?
[18:56] <kymara> midnight
[18:56] <kymara> that solves problem ina really rubbish way :P
[18:57] <Ci-Dev> Easiest would be to not use dayofyear,
[18:57] <Ci-Dev> but days_since_unix
[18:57] <Ci-Dev> Those never reset. ;)
[18:57] <Ci-Dev> Ah.
[18:57] <Ci-Dev> Yes.
[18:57] <Ci-Dev> You can commit that as fix.
[18:57] <Ci-Dev> As $day is never used yet,
[18:57] <kymara> ok
[18:57] <Ci-Dev> the contents there is not relevant.
[18:57] <kymara> i'll do that first
[18:57] <kymara> i just like to do it in small bits you know?
[18:57] <kymara> was the commit message about right?
[18:57] <Ci-Dev> I now do.
[18:58] <Ci-Dev> Yes.
[18:58] <Ci-Dev> Commit message matches the diff.
[18:59] <CIA-50> arianne_rpg: kymara * stendhal_website/scripts/monsters.php: applying patch provided by ci-dev, to fix a bug about number of days, i.e. 14 not 15, and to ensure that days with no kills are no longer silently skipped
[19:00] * Mein_Dino (n=fkdjgs@91-66-89-160-dynip.superkabel.de) has joined #arianne
[19:01] <kymara> using days_since_unix seems safe because atm its there as a day offset
[19:01] <Ci-Dev> kymara: TO_DAYS()
[19:01] <Ci-Dev> Just replace dayofyear with TO_DAYS
[19:02] <Ci-Dev> Then the value will never overflow and turn negative
[19:02] <Ci-Dev> So even if now is -01-01 it will return 1 for -12-31.
[19:02] <kymara> ok. when i tried days_since_unix it didnät like it
[19:02] <Ci-Dev> And not -364
[19:03] <Ci-Dev> Sorry, it was in pseudo-code.
[19:03] <Ci-Dev> I did not mention it, my bad.
[19:03] <kymara> ah np
[19:03] <kymara> hehe
[19:04] <kymara> thats seems good so i'll i put that as a commit now too. it's just good to do changes one a time in case there was anything wrong with one its easier to revert and see the diffs too
[19:05] <Ci-Dev> I agree.
[19:05] <CIA-50> arianne_rpg: kymara * stendhal_website/scripts/monsters.php: use TO_DAYS instead of dayofyear to avoid overflow problems when there is a new year, suggested by ci-dev
[19:06] <CIA-50> arianne_rpg: kymara * stendhal_website/scripts/monsters.php: oops sorry make both parts use TOD_DAYS not just one!
[19:08] <kymara> duh
[19:10] <Ci-Dev> I now checked out the website.
[19:11] <kymara> yay
[19:11] <kymara> if at any point you want to do testing on it there is a readme on how to setup the config fileetc
[19:12] <kymara> so what'd be good would be to get the date inside the loop that is currently looking like this
[19:12] <kymara> foreach($m->killed as $day=>$amount) {
[19:12] <kymara> $data=$data.$amount.',';
[19:12] <kymara> }
[19:12] <Ci-Dev> I already told you how.
[19:12] <kymara> ytep
[19:13] <Ci-Dev> > So in order to get the proper day, you have to do
[19:13] <Ci-Dev> > date('-m-d', time() - $day * 86400);
[19:13] <kymara> like um $day = date('-m-d', time() - $day * 86400);
[19:13] <kymara> yep
[19:13] <Ci-Dev> It is not a day anymore.
[19:13] <kymara> and then i need to pass that to bargaph you already said that too
[19:13] <Ci-Dev> It will be -month-day
[19:13] <Ci-Dev> Yes.
[19:13] <kymara> ok sorry $date = date('-m-d', time() - $day * 86400);
[19:13] <Ci-Dev> :)
[19:13] <kymara> but it wont be a column in data then
[19:14] <Ci-Dev> The bar graph cannot do it.
[19:14] <kymara> i was going to send $data=$data.$day.$amount.',';
[19:14] <Ci-Dev> Won't work.
[19:14] <Ci-Dev> Oh.
[19:14] <kymara> i'd fix bargraph?
[19:14] <kymara> like atm it does a $values = explode(",",$data);
[19:14] <Ci-Dev> Easiest would be:
[19:14] <kymara> and atm $values is just an amount
[19:15] <Ci-Dev> $data .= $date . '_' . $amount . ',';
[19:15] <Ci-Dev> And then you explode twice.
[19:15] <kymara> then i can get values as before and get date by exploding on _ ?
[19:15] <kymara> that is quite cool
[19:15] <Ci-Dev> Right.
[19:16] <kymara> explode seems just like split in java
[19:16] <Ci-Dev> So first explode on ',' to get the pairs,
[19:16] <Ci-Dev> and then on _ to get date/day and the actual value.
[19:16] <kymara> ok
[19:17] <kymara> we're not meant to use like um += too much in java
[19:17] <kymara> tertiary somethings
[19:17] <kymara> and the .= seems like that
[19:17] <kymara> can i do $data = =$data.$date . '_' . $amount . ',';
[19:17] <Ci-Dev> $data = $data . 'a'; and $data .= 'a'; seems the same.
[19:17] <kymara> oops too many equals
[19:17] <Ci-Dev> I never read of any difference.
[19:17] <kymara> ok
[19:17] <kymara> yes but readabuility
[19:18] <kymara> thats why we have that rule in the java code at least
[19:18] <Ci-Dev> Readability-wise, the .= is better, imho.
[19:18] <kymara> oh ok
[19:18] <Ci-Dev> You can do that as well.
[19:18] <kymara> no thats ok if in php the .= is more readable i'll do that
[19:18] <Ci-Dev> But I am easy on coding standards, as long as they are sane.
[19:41] <kymara> before it got $data=$data.$amount.','; and then did $values = explode(",",$data);
[19:41] <kymara> now with the extra i'm trying
[19:41] <kymara> $pairs = explode(",",$data);
[19:41] <kymara> foreach($pairs as $pair) {
[19:41] <kymara> list($date,$values) = explode("_",$pair);
[19:41] <kymara> }
[19:41] <kymara> with the help of google
[19:41] <kymara> can you see where iäm going wrong
[19:47] <Ci-Dev> To me that looks fine.
[19:47] <Ci-Dev> What kind of error do you get?
[19:48] <Ci-Dev> Oh.
[19:48] <Ci-Dev> Do you expect $values to be an array?
[19:49] <Ci-Dev> I'll check bargraph script.
[19:51] <kymara> yes values are also an array
[19:51] <kymara> hm
[19:52] <kymara> i am v out of my depth with all this
[19:52] <Ci-Dev> np
[19:54] <kymara> i should perhaps instead do list($d,$v) = explode("_",$pair); then $values[something)=$v, ?
[19:56] <kymara> later it uses values [$i] where i is from 0 up to number of values
[19:57] <Ci-Dev> What is the idea about tabs versus spaces in the code?
[19:57] <kymara> i really dont know, sorry
[19:57] <kymara> if there's a difference in convention that might just come from different developers
[19:58] <Ci-Dev> I see.
[19:58] <kymara> iirc the website was originally written by a bunch of students as a project set
[19:58] <kymara> and i've been trying to maintain it on my own since then with little knowledge of - well - anything!
[19:58] <Ci-Dev> If you do not mind, I can put my ideas into code and send you a patch?
[19:58] <kymara> oh sure yes that'd be great
[19:58] <kymara> thank you
[19:58] <kymara> shall i revert my bargraph.php to be from cvs head
[19:59] <Ci-Dev> I check it, one moment.
[20:00] <Ci-Dev> kymara: 1.6?
[20:00] <Ci-Dev> There is just a change in a comment according to ViewCVS.
[20:00] <kymara> yes, i just mean cos i have been messing with mine since then
[20:01] <kymara> so i'll get a clean one
[20:01] <Ci-Dev> I have bargraph 1.6 already.
[20:02] <Ci-Dev> So nothing needed to be reverted there.
[20:02] <kymara> yes now i have reverted thats what i have too
[20:06] <Ci-Dev> kymara: DCC you whole file?
[20:06] <Ci-Dev> Or just the patch?
[20:08] <kymara> whole file as i am lazy :D
[20:08] <Ci-Dev> Okay.
[20:09] <kymara> yay there are even explanatory comments
[20:09] <Ci-Dev> Isn't this standard?
[20:10] <kymara> not in the stendhal website code :D
[20:11] <Ci-Dev> Oh, there is still one check missing.
[20:12] <kymara> yep?
[20:12] <kymara> it works a lot better than my version anyway :D
[20:12] <kymara> iäm putting in to write the date now
[20:12] <Ci-Dev> kymara: One moment.
[20:13] <Ci-Dev> kymara: I forgot to reject an invalid value.
[20:14] <Ci-Dev> Without that check, there will be PHP warnings for "invalid index".
[20:15] <kymara> ok
[20:15] <kymara> it looks super nice now
[20:15] * Bluelads4 (i=5084f5b3@gateway/web/ajax/mibbit.com/x-3fdaccaea7d7aa3d) has joined #arianne
[20:15] <Ci-Dev> :)
[20:16] <kymara> if i'd done date as date('m-d', time() - $day * 86400); ionstead of -m-d would i lose the leading -
[20:16] <kymara> well i guess i could just try that
[20:16] <Ci-Dev> Yes.
[20:16] <Ci-Dev> But this is not a valid date according to ISO 8601.
[20:17] <kymara> oh
[20:17] <kymara> but it looks much neater
[20:17] <Ci-Dev> What about M?
[20:17] <Ci-Dev> A short textual representation of a month, three letters
[20:17] <Ci-Dev> Jan through Dec
[20:17] <Ci-Dev> 'd M'
[20:18] <Ci-Dev> 12 May
[20:18] <Ci-Dev> Or
[20:18] <kymara> that is nice
[20:18] <Ci-Dev> 'dS M'
[20:18] <Ci-Dev> 12th May
[20:18] <kymara> atm its M-d
[20:18] <kymara> so d M would be better
[20:18] <kymara> ok
[20:19] <kymara> can i do d-M or is that not valid
[20:19] <kymara> it'd show a bit better which belongs with which
[20:19] <kymara> or i could just increase the column padding
[20:20] <Ci-Dev> Whatever you like. :)
[20:20] <Ci-Dev> idk tbh
[20:20] <Ci-Dev> I usually use 'YYYY-MM-DD'.
[20:20] <Ci-Dev> And I know when skipping the year, it is "-MM-DD".
[20:22] <kymara> ok
[20:22] <kymara> its so much better having labelled axes
[20:24] <CIA-50> arianne_rpg: kymara * stendhal_website/ (content/scripts/monster.php bargraph.php): thanks to a lot of help from ci-dev, label the x axis of the creature graphs with the date.
[20:25] <kymara> oh
[20:25] <kymara> it looks totally different on the cvs one
[20:25] <kymara> i mean on website
[20:25] <kymara> than on the one i was chekcing on
[20:25] <kymara> thats no good
[20:25] <Ci-Dev> It now is "live"?
[20:25] <kymara> yes but its different to my test verion
[20:26] <kymara> number of days went up? :(
[20:26] <kymara> the test one looked perfect
[20:27] <kymara> but see eg http://stendhal.game-host.org/?id=content/scripts/monster&name=wolf&exact
[20:27] <Ci-Dev> First thing to notice is that the ORDER is not correct.
[20:27] <Ci-Dev> Apr and May get mixed.
[20:27] <kymara> and i can see some may written in
[20:27] <kymara> but we didnt change the order by in the query, did we
[20:30] <Ci-Dev> Okay.
[20:30] <Ci-Dev> This is a known "issue".
[20:30] <Ci-Dev> Guess you database is pretty fresh.
[20:30] <Ci-Dev> And not used heavily.
[20:30] <Ci-Dev> The results need to be ordered at first.
[20:31] <kymara> yes definitely fresh. i had to login to kill some stuff to have some data there
[20:31] <Ci-Dev> Is it better to sort the array in PHP or in MySQL?
[20:32] * gummipferd (n=user@92.117.181.58) has joined #arianne
[20:32] * gummipferd (n=user@92.117.181.58) has left #arianne
[20:33] <kymara> i think it was done in mysql before, i dont know what is better
[20:34] <kymara> can order by dayoffset, no?
[20:36] <Ci-Dev> I think we did it the other way around.
[20:36] <Ci-Dev> So we have negative offsets now.
[20:38] <Ci-Dev> kymara: Where should today be?
[20:38] <Ci-Dev> Left or right?
[20:38] <kymara> before it was ordered so that today was on the left which i thought was bad and wrong so i reordered it inside bargraph
[20:38] <kymara> if its ordered correctly now in the myswl i will revert that part of bargrpah that i changes
[20:38] <kymara> uff typing
[20:39] <Ci-Dev> imho fix the problem at the root and not somewhere else.
[20:39] <Ci-Dev> bargraph should print the data in the order it gets it.
[20:39] <kymara> yes
[20:39] <kymara> sorry
[20:39] <kymara> i'll fix that back then
[20:41] <Ci-Dev> Hm.
[20:41] <Ci-Dev> I did some more changes to the file before.
[20:41] <Ci-Dev> Think I'll do a fresh one then so you just get the relevant changes for this problem.
[20:41] <Ci-Dev> Others can be committed in another commit.
[20:43] <kymara> ok
[20:45] <Ci-Dev> The offset we had was negative.
[20:45] <Ci-Dev> So everything in the database matched.
[20:46] <Ci-Dev> It worked locally at yours, because you just had a few kills recoreded there.
[20:47] <kymara> just todays i guess
[20:48] <kymara> does it work now for youm
[20:48] <kymara> because i get mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/katie/public_html/stendhal_website/scripts/monsters.php on line 125
[20:48] <Ci-Dev> I check.
[20:49] <kymara> as in, i will check, or i do check?
[20:52] <Ci-Dev> kymara: How do I check?
[20:52] <Ci-Dev> There is no gameEvents structure in the stendhal_website.sql file.
[20:52] <Ci-Dev> *for that table
[20:52] <Ci-Dev> And to me, the query looks fine as well.
[20:53] <Ci-Dev> Only thing to try is to add a space after GROUP BY
[20:53] <kymara> gameEvents is part of the stendhal game website as defined in your configuration.php
[20:53] <Ci-Dev> "group by day_offset " <-- last space there
[20:53] <kymara> not part of the stendhal website
[20:53] <kymara> uff
[20:53] <kymara> i cant speak
[20:54] <kymara> in the configuration.php there is defined a game db and a website db, and the game events table is from game db
[20:54] <kymara> if you don't have a test server then you can't check
[20:54] <kymara> can one really do group by and order by together
[20:55] <kymara> iäd tried that myself before you sent me the file and it didnät work for me, i just did a simple one
[20:55] <Ci-Dev> kymara: Do you have phpMyAdmin?
[20:56] <Ci-Dev> So you can check what's wrong with the query by issuing it manually?
[20:56] <Ci-Dev> Yes, GROUP BY and ORDER BY can be done together.
[20:56] <Ci-Dev> Definitly.
[20:57] <kymara> i coul djust issue it manually on the server using mysql
[20:57] <kymara> but there are rules for them, the so called single value rule
[20:57] <kymara> i'm wondering if that is what is wrong
[20:57] <Ci-Dev> What is a "single value rule"?
[20:58] <Ci-Dev> kymara: Can you do a dump of your gameEvents table and send it to me?
[20:58] <Ci-Dev> just export it with structure and data
[20:58] <Ci-Dev> And I check
[20:58] <kymara> i found the link here
[20:58] <kymara> http://www.webmasterworld.com/forum88/4785.htm
[20:58] <kymara> from http://www.webmasterworld.com/forum88/9531.htm
[20:59] <kymara> i dont know how to do db dumps sorry
[20:59] <Ci-Dev> That's not the issue.
[20:59] <kymara> ok
[20:59] <Ci-Dev> We have day_offset and COUNT(*)
[21:00] <kymara> i just googles, which is what i usually do when i am not sure :)
[21:00] <kymara> googled
[21:00] <Ci-Dev> And day_offset is what we use for GROUP BY
[21:00] <Ci-Dev> Without GROUP BY, a COUNT is nearly useless.
[21:00] <Ci-Dev> kymara: In phpMyAdmin, browse the gameEvent table.
[21:00] <Ci-Dev> In top menu, there is an item called "export".
[21:01] <Ci-Dev> And then just tick structure and data. That should be enough.
[21:01] <kymara> i dont have that program sorry
[21:01] <Ci-Dev> Oh. np.
[21:01] <Ci-Dev> One more moment then.
[21:01] <kymara> i was just going to start trying the query in the db itself
[21:01] <kymara> see what it says
[21:03] <kymara> Unknown column 'day_offset' in 'where clause'
[21:03] <kymara> odd
[21:03] <Ci-Dev> Which version of MySQL is it?
[21:03] <Ci-Dev> SELECT VERSION();
[21:04] <kymara> before it was datediff(now(),timedate)<'.$numberOfDays.' instead of using day_offset
[21:04] <Ci-Dev> I know.
[21:04] <Ci-Dev> But there should no reason to evaluate that again if we already have it in our SELECT.
[21:04] <kymara> 5.0.51a-3ubuntu5.4
[21:05] <kymara> not sure what server itself uses iäd have to check
[21:05] <Ci-Dev> Very odd.
[21:05] <kymara> 5.0.51a-24
[21:06] <Ci-Dev> Does it run in some kind of ANSI SQL mode or so?
[21:06] <Ci-Dev> Anyway, by replacing it with the SELECT thingy, it will work
[21:06] <kymara> if i do it with the datediff instead of using day_offset i get empty set in my server
[21:06] <Ci-Dev> So in WHERE, just do a
[21:06] <Ci-Dev> "TO_DAYS(NOW()) - TO_DAYS(timedate)" instead of day_offset
[21:06] <kymara> did we stop using today itself?
[21:06] <Ci-Dev> Stop using today?
[21:07] <kymara> well, i killed 8 wolves today in my server
[21:07] <kymara> and they used to show on the bar graph at least
[21:07] <kymara> now when i do the select that is new, it gives an emoty set
[21:07] <kymara> empty.
[21:07] <kymara> so did we stop using today
[21:08] <Ci-Dev> Not that I am aware of.
[21:08] <kymara> ok
[21:08] <Ci-Dev> Just because the diff should be 0 for today.
[21:08] <kymara> i still get an error from the query but the graph is now showing
[21:09] <kymara> mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/katie/public_html/stendhal_website/scripts/monsters.php on line 150 and line 154
[21:11] <Ci-Dev> This is because the query is invalid, and the PHP script assumes a valid query and doesn't check if it is not valid.
[21:11] <kymara> after i corrected the query to use "TO_DAYS(NOW()) - TO_DAYS(timedate)" instead of day_offset, i mean
[21:11] <kymara> and the graph is now showing again correctly
[21:12] <Ci-Dev> TO_DAYS(timedate) - TO_DAYS(NOW()) returns negative offsets
[21:12] <Ci-Dev> And any negative number is smaller than 14.
[21:12] <kymara> sorry but i am confused
[21:13] <kymara> i am using the file you sent me
[21:13] <kymara> except with "TO_DAYS(NOW()) - TO_DAYS(timedate)" instead of day_offset just as you told
[21:13] <kymara> and there is an error from it, that i pasted
[21:13] <Ci-Dev> day_offset < '.$numberOfDays.' and
[21:13] <Ci-Dev> TO_DAYS(NOW()) - TO_DAYS(timedate) < '.$numberOfDays.' and
[21:13] <Ci-Dev> I can send another file.
[21:13] <Ci-Dev> If you did not other changes to it.
[21:14] <kymara> that is what i did
[21:14] <kymara> i replaced that
[21:14] <kymara> and the mysql query is fine
[21:14] <Ci-Dev> Ah.
[21:14] <kymara> e.g. in main game server it shows for first few columsn
[21:14] <kymara> +------------+--------+
[21:14] <kymara> | day_offset | amount |
[21:14] <kymara> +------------+--------+
[21:14] <kymara> | 13 | 429 |
[21:14] <kymara> | 12 | 223 |
[21:14] <kymara> | 11 | 324 |
[21:14] <kymara> | 10 | 308 |
[21:14] <Ci-Dev> And what are the last one?
[21:15] <Ci-Dev> Is that one day_offset = 0?
[21:15] <kymara> yes
[21:15] <kymara> i think its from the second query that errors come
[21:15] <Ci-Dev> So we fetch all data from database.
[21:15] <kymara> keep forgetting there are two practical identical queries :/
[21:15] <Ci-Dev> In both queries, the day_offset in WHERE needs to be replaced.
[21:15] <kymara> yeah
[21:15] <kymara> sorry
[21:16] <kymara> thats better
[21:16] <Ci-Dev> Works now?
[21:16] <kymara> yes
[21:16] <kymara> changing the desc makes no difference
[21:16] <kymara> to which side is today (left or right)
[21:16] <Ci-Dev> Oh?
[21:16] <Ci-Dev> Ah.
[21:16] <Ci-Dev> Haha.
[21:16] <Ci-Dev> I know why.
[21:16] <Ci-Dev> Let me fix it.
[21:17] <kymara> i had already changed bargraph away from my 'fix'
[21:17] <Ci-Dev> So bargraph doesn't revert it?
[21:17] <Ci-Dev> *reverse
[21:17] <kymara> so that it is again $x1 = $i*$column_width; not what it is now
[21:17] <kymara> so what if bargraph reversed it, you'd still expect to see it on one side in a desc and on the other in a inc
[21:19] <Ci-Dev> Hm.
[21:19] <kymara> it works ok if i leave it as it was before (after my clumsy fix)
[21:20] <Ci-Dev> ASC and DESC then changes the order?
[21:20] <Ci-Dev> Or it then is always ordered with today being to the very right?
[21:20] * yoriy (n=opera@81.16.113.174) has joined #arianne
[21:21] <kymara> desc and nothing, no desc, just left it the same
[21:21] * yoriy (n=opera@81.16.113.174) has left #arianne
[21:21] * yoriy (n=opera@81.16.113.174) has joined #arianne
[21:22] <kymara> i might just commit these though and see if itäs better on main game server :)
[21:22] <kymara> it should be better than before
[21:22] <yoriy> kym?
[21:23] <kymara> yes?
[21:23] <CIA-50> arianne_rpg: kymara * stendhal_website/scripts/monsters.php: fix mysql query to correctly order by days, thanks to ci-dev
[21:23] <yoriy> http://stendhal.game-host.org/?id=content%2Fscripts%2Fcharacter&name=yoriy&search=Search, i see that i carry L hand sword in RIGHT hand
[21:23] <yoriy> but, in fact, i equipped with both twin swords now
[21:23] <kymara> i think a bug report was made on them
[21:24] <kymara> website only likes to see weapons in one hand and shield in other
[21:24] <kymara> if you were holding a carrot in one hand it didnät used to show it
[21:24] <kymara> and would sometimes get confused
[21:24] <kymara> i think diejossi made a patch to fix it and someone assigned it to themself to apply and never did ....
[21:24] <kymara> it needs fixing the stendhal database itself atcually not the website code
[21:24] <yoriy> hm :-)
[21:25] <yoriy> then ok
[21:25] <Ci-Dev> Is that monsters.php on the website already?
[21:25] <kymara> i just updated a second ago
[21:25] <kymara> i can see the correct number of columns now on it
[21:26] <kymara> yay :)
[21:26] <kymara> http://stendhal.game-host.org/?id=content/scripts/killedstats <-- you see i put recently there, about the best player killer stats etc
[21:27] <kymara> that was because i thought it was querying from the whole of gameevents since it was last backed up refreshed to be clean
[21:27] <kymara> but in fact it's last 7 days
[21:27] <kymara> if i said that there, Most killed (last 7 days) etc then is that better than saying Most killed (recently)
[21:27] <Ci-Dev> But bargraph still reverses the order.
[21:27] <kymara> or can too much detailed info be a bad thing?
[21:27] <Ci-Dev> Though, for now it seems to work fine.
[21:28] <kymara> it does yes. i tried taking that off and today was always to left
[21:28] <kymara> whichever order was chosen
[21:28] <kymara> so, it seemed better to leave it as it was, i prefer today to right
[21:29] <Ci-Dev> Yes, I agree.
[21:29] <Ci-Dev> But still something is not working as expected if the ORDER BY doesn't do anything.
[21:32] <kymara> well, till we have energy to fix we can pat ourselves on back for a job well done
[21:33] <kymara> thank you
[21:33] <Ci-Dev> You're welcome.
[21:46] <CIA-50> arianne_rpg: kymara * stendhal_website/bargraph.php: adjust positions of numerals so that the 4 digit ones dont fall off edge. fix older comments
[21:55] * madmetzger1 (n=markus@p5B03BF13.dip.t-dialin.net) Quit ("Leaving.")
[21:56] * yoriy (n=opera@81.16.113.174) has left #arianne
[22:01] * erdnuggel (n=blub@p5DD42CF6.dip.t-dialin.net) Quit ()
[23:23] * Mein_Dino (n=fkdjgs@91-66-89-160-dynip.superkabel.de) Quit ()

These logs were automatically created by _eye_fill_in on irc.freenode.net using the Java IRC LogBot.