--- Log opened Fri Jun 29 00:00:51 2018 20180629 00:10:24-!- `ani` [~molgrum@databur.st] has quit [Ping timeout: 256 seconds] 20180629 00:31:41-!- `ani` [~molgrum@databur.st] has joined #wesnoth 20180629 00:39:28-!- sevu [~Shiki@p54854B6F.dip0.t-ipconnect.de] has joined #wesnoth 20180629 00:59:32-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 00:59:39-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 01:17:00-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth 20180629 01:21:42-!- gfgtdf [~gfgtdf@134.76.63.8] has joined #wesnoth 20180629 01:44:51-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 01:52:33-!- cyphase [~cyphase@unaffiliated/cyphase] has quit [Read error: Connection reset by peer] 20180629 01:56:21-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 02:00:10-!- cyphase [~cyphase@unaffiliated/cyphase] has quit [Read error: Connection reset by peer] 20180629 02:01:02-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 02:04:08-!- Appleman1234 [~quassel@121.222.147.211] has joined #wesnoth 20180629 02:05:01-!- cyphase [~cyphase@unaffiliated/cyphase] has quit [Read error: Connection reset by peer] 20180629 02:20:40-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 02:46:02-!- synthpopisback [~synthpopi@cpe-2606-A000-7947-5000-DCA-D54B-51E7-DC01.dyn6.twc.com] has quit [Ping timeout: 245 seconds] 20180629 02:46:48-!- synthpopisback [~synthpopi@cpe-2606-A000-7947-5000-8809-5462-6578-4A50.dyn6.twc.com] has joined #wesnoth 20180629 02:57:25-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 02:57:32-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 03:32:31-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 03:32:38-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 03:39:06-!- shiki [~Shiki@p54854BC3.dip0.t-ipconnect.de] has joined #wesnoth 20180629 03:39:06-!- sevu [~Shiki@p54854B6F.dip0.t-ipconnect.de] has quit [Disconnected by services] 20180629 03:42:25-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Ping timeout: 248 seconds] 20180629 04:16:44-!- gfgtdf_ [~gfgtdf@134.76.63.8] has joined #wesnoth 20180629 04:20:27-!- gfgtdf [~gfgtdf@134.76.63.8] has quit [Ping timeout: 260 seconds] 20180629 04:26:46-!- `ani` [~molgrum@databur.st] has left #wesnoth ["Leaving"] 20180629 05:30:32<+discordbot3> The Adnroid version is really awkward to use to say the least. 20180629 06:28:31< galegosimpatico> I have to create a new repository for a small utility, but I don't know which SaaS use as backup. 20180629 06:29:31<+discordbot3> I use SourceForge for a personal project of mine. 20180629 06:34:30< galegosimpatico> If you started today, would you prefer SourceForge before BitBucket? 20180629 06:34:52< galegosimpatico> s/before/over/ 20180629 06:38:41<+discordbot3> Yes. 20180629 06:39:07<+discordbot3> The main reason why I use SF is that I strongly dislike Git. I prefer to use SVN instead. 20180629 06:47:23< galegosimpatico> Strong in the ways of the Force you are. Casting off-topic away with ease you can. 20180629 07:24:02-!- Appleman1234 [~quassel@121.222.147.211] has quit [Ping timeout: 260 seconds] 20180629 07:35:47-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth 20180629 07:42:27-!- cyphase [~cyphase@unaffiliated/cyphase] has quit [Ping timeout: 240 seconds] 20180629 07:45:58-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 09:18:12-!- Haudegen [~quassel@178.115.237.87] has joined #wesnoth 20180629 09:31:59-!- ibispi [~quassel@188.246.34.98] has joined #wesnoth 20180629 09:37:35-!- DasBrain [~Johannes1@unaffiliated/johannes13] has joined #wesnoth 20180629 10:20:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 10:21:04-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 10:42:55-!- dobson [~dobson@68.ip-149-56-14.net] has quit [Quit: Leaving] 20180629 10:54:23-!- dobson [~dobson@68.ip-149-56-14.net] has joined #wesnoth 20180629 11:43:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 11:43:13-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 11:53:51-!- Appleman1234 [~quassel@121.222.147.211] has joined #wesnoth 20180629 12:01:14-!- marmistrz [marmistrz@faris.wolf480.pl] has quit [Ping timeout: 268 seconds] 20180629 12:02:04-!- gfgtdf_ [~gfgtdf@134.76.63.8] has quit [Read error: Connection reset by peer] 20180629 12:04:21-!- marmistrz [marmistrz@faris.wolf480.pl] has joined #wesnoth 20180629 12:41:48-!- Haudegen [~quassel@178.115.237.87] has quit [Remote host closed the connection] 20180629 13:04:38<+discordbot3> waddap, what's the coolest campaign to play? 20180629 13:04:40-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth 20180629 13:07:31< hk238> hello can someone help me interpret this expression: 20180629 13:08:07< hk238> wml.variables[string.format("weather_event[%d]", event_num)] = { turn = turn, weather_id = "snowfall", } 20180629 13:09:09< Ravana_> yes 20180629 13:09:59< hk238> :D 20180629 13:10:07< zookeeper> well, it sets the weather_event array's event_numth member to have the contents of turn=turn and weather_id=snowfall 20180629 13:10:45< hk238> okay so I think I have problem with the way I wrote this :D 20180629 13:10:49< hk238> one sec 20180629 13:10:49< zookeeper> where turn=turn of course means turn=whatever_turn_evaluates_to_here 20180629 13:11:35< hk238> https://pastebin.com/mHnaxfwY 20180629 13:11:54< hk238> so if you look at corresponding parts with that expression.. It seems I'm writing "weather_id = weather_id" 20180629 13:11:59< hk238> I think that's not correct :D 20180629 13:12:28< hk238> so.. how do I fix this? :d 20180629 13:12:50< zookeeper> do you know it's not correct? 20180629 13:13:07<+discordbot3> @Silver mainline or umc? 20180629 13:13:13< hk238> actually no, but it's not working and this is the first thing now I thought that is probably wrong 20180629 13:13:31< hk238> also since i'm modifying dark forecast by tinkering, the previous code was working, but it had a different kind of expression 20180629 13:13:35< hk238> the problem I think i sthat 20180629 13:13:55< hk238> the event is supposed to have content with a name like "weather_id = "snowfall"" 20180629 13:14:14< hk238> but when I'm using a variable that has the same name, there's some kind of a scope problem perhaps? 20180629 13:14:38< hk238> does that seem plausible? :o 20180629 13:14:43< Ravana_> you can paste your code to lua console to quickly test something 20180629 13:14:56< hk238> how do I do that? :o 20180629 13:15:44< Ravana_> ctrl+v, it doesn't show newlines, but still pastes them 20180629 13:17:34< hk238> I mean where do I find a console? :o 20180629 13:18:07< Ravana_> its default hotkey is something like shift+ยด+ยด, but should find it in hotkeys and add something else for it 20180629 13:22:41< hk238> okay I foun dthe console 20180629 13:22:46< hk238> I didnt know there was one :D 20180629 13:23:23< hk238> okay there's an error 20180629 13:23:29< hk238> it says "do" expected near "if" 20180629 13:23:44< hk238> do I need to write those if clauses with "then do" structure? probably? but why? 20180629 13:24:08< hk238> line 23 on the pastebin 20180629 13:24:38< Ravana_> while expects do 20180629 13:26:01< hk238> oh 20180629 13:26:07< hk238> okay that's probably the problem then :D 20180629 13:27:08< hk238> yeah I guess it kind of makes sense 20180629 13:29:43< hk238> weird now I'm getting unexpected symbol near line623. .I wonder if this "kate" editor is doing something weird. Like shift spaces or something :D 20180629 13:30:20< hk238> is that what the "unexpected symbol" error message is usually about? or is it more like about keywords? 20180629 13:30:42< Ravana_> less shows unusual symbols by their codes 20180629 13:31:09< hk238> less shows? 20180629 13:31:25< hk238> is less an editor? 20180629 13:33:07-!- Haudegen [~quassel@212-186-77-29.static.upcbusiness.at] has joined #wesnoth 20180629 13:34:10-!- DeFender1031 [~DeFender1@93-173-122-186.bb.netvision.net.il] has quit [Read error: Connection reset by peer] 20180629 13:34:14< hk238> I think it's an editor problem 20180629 13:34:27-!- DeFender1031 [~DeFender1@93-173-122-186.bb.netvision.net.il] has joined #wesnoth 20180629 13:34:48<+discordbot3> I don't think you can access array variables that way 20180629 13:35:38< hk238> are you talking to me vultraz? 20180629 13:35:46<+discordbot3> yes 20180629 13:36:09< hk238> what are you referring to ? :o 20180629 13:36:31< hk238> anyhow I think current problem is an editor problem, if that's what the "unexpected symbol" error means 20180629 13:36:49<+discordbot3> or i guess you copied thta from somewhere, so it must be correct ๐Ÿค” 20180629 13:36:57<+discordbot3> oh well 20180629 13:37:29< hk238> uhm 20180629 13:37:32< hk238> :D 20180629 13:37:42< hk238> I dont know if it's correct, this code isn't working currently 20180629 13:38:14< hk238> but the problem is perhaps this symbol error issue 20180629 13:39:07<+discordbot3> what line? 20180629 13:39:18< Soliton> unexpected symbol presumably means there is a symbol that is syntactically not possible/valid. not that it's an invalid character or whatever. 20180629 13:39:52-!- shiki [~Shiki@p54854BC3.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20180629 13:40:58< hk238> the last line near the ) at the end 20180629 13:41:26< hk238> and this is from dark forecast, but i made a custom version called "murky weathercast" 20180629 13:41:43< hk238> and I have like zero experience with lua so this quite handicapped :D 20180629 13:41:48<+discordbot3> i definitely see a problem with this line... lua ml.variables[string.format("weather_event[%d]", event_num)] = { turn = turn, weather_id = , } 20180629 13:41:51<+discordbot3> no value for weather_id 20180629 13:42:00< hk238> huh 20180629 13:42:17<+discordbot3> line 31 in paste 20180629 13:42:18< hk238> sorry I must have copy pasted the page while I was writing that part 20180629 13:43:40< hk238> I really should convert this to a function also :D 20180629 13:44:19< hk238> https://pastebin.com/JrjHMxHc 20180629 13:44:43< hk238> here's a "newer" version, I created an in-between variable called temporary in case the weather_id = weather_id structure was incorrect 20180629 13:45:16< hk238> I wondering if the expression (in the original code) is supposed to both set the variable and the event at the same time, fi it's kind of an expression structure 20180629 13:45:22< hk238> but that's probably not it :D 20180629 13:45:39< hk238> meanwhile the symbol error comes right at the end, 20180629 13:45:59< hk238> and I didn't modify the function that comes after that, so I think error must be within this re-written part, or the weather thing 20180629 13:45:59<+discordbot3> what is the exact message? 20180629 13:46:20< hk238> hmm it's not possible to copypaste from console but it says 20180629 13:46:38< Ravana_> if does not have do 20180629 13:46:39<+discordbot3> there's a copy button 20180629 13:46:51<+discordbot3> if you open the lua console 20180629 13:46:54<+discordbot3> using ~ 20180629 13:46:59< hk238> ah 20180629 13:47:07< hk238> sorry I'm getting confused with these files 20180629 13:47:19< hk238> I did remove the "do"s but I guess I did that in the wrong tab 20180629 13:47:20< hk238> :D 20180629 13:47:56<+discordbot3> oh, yeah, definitely remove do after then 20180629 13:48:18< hk238> okay that probably is the only error remaining I hope let' ssee if it works 20180629 13:48:50<+discordbot3> a do statement could be valid there but it would require its own end closer 20180629 13:49:03< hk238> hmm no errors 20180629 13:49:10< hk238> itmight be working 20180629 13:49:11< hk238> :D 20180629 13:49:34<+discordbot3> remember, while [cond] do [stuff] end and if [cond] then [stuff] end 20180629 13:50:17<+discordbot3> also, what are you doing with weather_to_dispense here? 20180629 13:51:51< hk238> pretty much nothing it was in the old code but in this version it's not required 20180629 13:52:01< hk238> and also it's still pretty horrible 20180629 13:52:03< hk238> :D 20180629 13:52:09< hk238> it's nto working 20180629 13:52:12< hk238> but there's no lua error 20180629 13:52:20< hk238> the lua file executes but weather is not changing anymore 20180629 13:53:44< hk238> it's probably the expression that saves the events doesn't work. Or somethnig like that 20180629 13:54:14< hk238> I was going to write tables for odds in the weather_to_dispense table 20180629 13:54:28< hk238> but then it's not even working now 20180629 13:55:26< hk238> the main problem is probably structure is terrible, it includes a loop and is completely unclear if it even terminates just by looking at it 20180629 13:56:00< hk238> it would be much better as somekind of a function with map() to the event array or somtehing but i 20180629 13:56:13< hk238> dont know how to do that sorry.. but at least there are no lua errors 20180629 13:59:41< hk238> oh well I'm going to rewrite it again 20180629 13:59:42< hk238> :D 20180629 13:59:59< hk238> if someone could help with problem it would be nice there's probably going to be lots :o 20180629 14:00:15<+discordbot3> @VYNLT umc? 20180629 14:00:28<+discordbot3> UMC = fanmade campaign 20180629 14:00:36<+discordbot3> pretty much stuff that you find on the add-on section 20180629 14:00:38<+discordbot3> yeah, sure, these are probably better 20180629 14:00:42<+discordbot3> which one though? 20180629 14:00:54<+discordbot3> welp i havent played many but i recommend Invasion From the Unknown 20180629 14:00:57<+discordbot3> I tried some but most of them become boring after a while, commanding like 40 units 20180629 14:01:13<+discordbot3> it's pretty much an unofficial sequel to Under the Burning Suns (mainline campaign) 20180629 14:01:38<+discordbot3> I played that, didn't finish it yet though 20180629 14:01:39<+discordbot3> it fits into the mainline lore if you want to do that in your headcanon but officially it's not canon 20180629 14:01:40<+discordbot3> ah 20180629 14:01:53<+discordbot3> After the Storm then? once it gets ported that is 20180629 14:02:11<+discordbot3> the burning suns became quite easy, all my units are maxed out and pretty busted 20180629 14:02:19<+discordbot3> UTBS was hard for me lol 20180629 14:02:36<+discordbot3> also Genesis, Genesis is quite unique (it's also a prequel to Invasion from the Unknown, as far as i know the creator of IFTU does consider it canon to her unofficial canon) 20180629 14:02:38<+discordbot3> well I didn't choose the hardest difficulty, just the medium one 20180629 14:02:46<+discordbot3> (i could be wrong though, dont remember correctly) 20180629 14:02:56<+discordbot3> im not that good at Wesnoth so for it me it was tough even on easy lol 20180629 14:03:02< Ravana_> sensible to split it to functions so that you can check that they work 20180629 14:03:23<+discordbot3> I think healers make most campaigns easy 20180629 14:04:18<+discordbot3> thought you can't have them in some, like the dwarf one 20180629 14:04:25<+discordbot3> then it's much harder from my experience 20180629 14:05:13<+discordbot3> ah 20180629 14:05:23<+discordbot3> welp i think Genesis has healers but it does play in a pretty unique way 20180629 14:05:27<+discordbot3> so i still suggest you try it out 20180629 14:05:31<+discordbot3> I'll try it out 20180629 14:05:34<+discordbot3> its a prequel to IFTU, like i said 20180629 14:05:56<+discordbot3> should I finish the burning suns then? 20180629 14:06:13<+discordbot3> yes 20180629 14:06:19<+discordbot3> got to a point where it was just wall of text after another wall of text, eventually decided to skip it 20180629 14:06:26<+discordbot3> oh 20180629 14:06:36<+discordbot3> struggle to read text on black background :d 20180629 14:06:44<+discordbot3> well, for IFTU and After the Storm it's recommended to play UTBS and Descent into Darkness first 20180629 14:07:03<+discordbot3> (Descent into Darkness isnt THAT necessary but the protagonist appears in IFTU and ATS so yeah) 20180629 14:07:12<+discordbot3> (helps you understand more about him) 20180629 14:07:24<+discordbot3> I see 20180629 14:07:26<+discordbot3> DiD isnt necessary for Genesis though as far as i know 20180629 14:07:36<+discordbot3> and as for UTBS, i think it is less necessary but i could be wrong 20180629 14:07:48<+discordbot3> i havent completed Genesis though so idk 20180629 14:08:42<+discordbot3> I might've played descent into darkness some time ago 20180629 14:08:50<+discordbot3> do you end up as a lich in some cave at the end? 20180629 14:09:46<+discordbot3> yes 20180629 14:09:49<+discordbot3> Malin Keshar becomes a lich 20180629 14:09:56<+discordbot3> and he appears in IFTU and ATS 20180629 14:10:12<+discordbot3> cool, I'll try out genesis first then 20180629 14:10:14<+discordbot3> seems pretty cool 20180629 14:10:39<+discordbot3> yeah, from what ive seen so far Genesis is kinda unique 20180629 14:11:21<+discordbot3> it focuses more on the protagonists rather than the units you recruit (and has some unique mechanics at times) but you will have to recruit units, so dont think that you dont need to recruit 20180629 14:12:52< hk238> hm 20180629 14:13:03< hk238> I'll try refactoring this 20180629 14:13:26< hk238> still not as fancy as the predicate function but it's better 20180629 14:14:14<+discordbot3> that's a positive in my opinion, controlling more than 20 units becomes quite tedious at times 20180629 14:16:46<+discordbot3> cool. very happy to see that my suggested changes will be going into the colosseum https://forums.wesnoth.org/viewtopic.php?p=630582#p630582 20180629 14:17:02<+discordbot3> thanks Shiki 20180629 14:17:26<+discordbot3> btw. is shiki on discord? 20180629 14:17:56<+discordbot3> yeah, he's @sevu 20180629 14:18:13<+discordbot3> I see. Thanks @sevu 20180629 14:18:29< hk238> https://pastebin.com/xS0A8e1a 20180629 14:18:33< hk238> is this function correctly written? :o 20180629 14:19:17< hk238> although I guess when the function is reduced to a manually written table, it might just as well be a table 20180629 14:19:23< hk238> so in a sense it's inane :D 20180629 14:20:14< hk238> but then on the other hand, basically all functions are kind sort of tables.. there's an input value and an output value or so I've heard 20180629 14:20:51< hk238> could also include an error message if there's no item corresponding to the input string 20180629 14:20:59-!- gfg [~androirc@tmo-116-79.customers.d1-online.com] has joined #wesnoth 20180629 14:21:30< gfg> you cannot have spaces in variable names like that, better use underscores instead 20180629 14:21:54< hk238> oh 20180629 14:22:00< hk238> can I use quotation marks? 20180629 14:22:08< hk238> since the input parameters are strings and they're supposed to have spaces 20180629 14:22:53< gfg> you could but it's probably easier to change those ids to use underscores everywhere in your code. 20180629 14:22:56< hk238> also gfg where did you come from :D 20180629 14:23:19< hk238> okay suggestion noted I like underscores too but these are strings 20180629 14:23:33< hk238> so let's try the questions marks for, I hope you don't mind 20180629 14:23:33< hk238> :D 20180629 14:23:57< hk238> time to some coffee : ) 20180629 14:25:43< hk238> I keep forgetting words even from everyday sentences.. "for now, I hope.." "time to get some coffee" 20180629 14:25:44< hk238> :D 20180629 14:27:31< gfg> ok 20180629 14:29:03<+discordbot3> no, you didnt close the tables 20180629 14:30:12<+discordbot3> you need { clear = { "clear", "drought", "rain", "snowfall", }}, 20180629 14:31:23< hk238> right thanks sorry 20180629 14:31:29< gfg> i think he put a bracket to much and not missed one, the ones before clear etc shiuld just be not there 20180629 14:31:43<+discordbot3> hm true 20180629 14:32:19< hk238> oh thanks 20180629 14:32:56< hk238> but wait now that we're discussing that if I want to associate a value with each of those strings how would I do that? 20180629 14:33:26< hk238> like if I want to use a number to represent the weighing of the weather 20180629 14:34:13< hk238> well one second I'll make a pastebin 20180629 14:34:49<+discordbot3> lua local weather_tables = { clear = { "clear" = 1, "drought" = 2, "rain" = 3, "snowfall" = 4 }} 20180629 14:35:15<+discordbot3> I think 20180629 14:37:49< hk238> https://pastebin.com/QukXRhVM 20180629 14:37:50< gfg> you can't put take keys in quotation Marks like that, you have to use clear=1 or ["clear"]=1 20180629 14:38:08<+discordbot3> really? 20180629 14:38:24<+discordbot3> good to know 20180629 14:38:33< hk238> oh but that was what I was trying to ask earlier and you said you could use them, but okay good to know 20180629 14:38:47< gfg> i cannot test it right know but that's how i remember it. 20180629 14:39:09< hk238> hmm if I wanted to know write a function that would take the numbers associated with each string 20180629 14:39:10<+discordbot3> weather_tablesclear is valid, then? 20180629 14:39:48< hk238> yes I wanted to use the quotation marks because some of the names have spaces in them so.. I mean they're strings but they're not strings 20180629 14:40:09< hk238> I dont know :D 20180629 14:40:13<+discordbot3> use underscored 20180629 14:40:16<+discordbot3> s 20180629 14:40:34< hk238> but they're strings :o 20180629 14:40:46< hk238> I'll try the bracket version 20180629 14:40:55< hk238> but I see that this is a problem 20180629 14:40:57< hk238> :D 20180629 14:40:57<+discordbot3> no, that's not how it works 20180629 14:41:42<+discordbot3> i mean, the `["test string"] syntax does mean you can use spaes 20180629 14:43:13< hk238> okay so now I have this datastructure.. tables which have keys which is the id of the weather, and it's associated with a number. I want to use the table as an input parameter for a function, and it chooses one of them by random 20180629 14:43:37< hk238> so I guess that means I'll put wesnoth.random() in there the details are not the issue 20180629 14:43:56< hk238> but how do I iterate over the key and value pairs and backwards associate the number with the key? 20180629 14:44:49<+discordbot3> backwards associate? 20180629 14:45:23< hk238> like I can get a number from a string, but how do return the key as a value? 20180629 14:45:47< Ravana_> for in with pairs if you need nonint keys, pairs otherwise 20180629 14:45:51< Ravana_> for in with pairs if you need nonint keys, ipairs otherwise 20180629 14:46:24< hk238> okay 20180629 14:47:02< hk238> so yeah let's put this iterator in a function then I think I could try and mimic jyrkive's random function I'm not sure exactly how yet let's see 20180629 14:47:22<+discordbot3> i think pairs returns two values? 20180629 14:47:35<+discordbot3> im not sure.. 20180629 14:47:38<+discordbot3> i always use ipairs 20180629 14:47:59<+discordbot3> for i, entry in ipairs(table) do [stuff] end 20180629 14:48:21< hk238> okay so how would i write a function that sums up the values in the table? 20180629 14:48:31< hk238> using pairs 20180629 14:49:07< hk238> local response = 0 for str,val in table do response + val ? 20180629 14:50:02< hk238> in pairs that is 20180629 14:51:00< hk238> https://pastebin.com/biXQ4KGJ 20180629 14:51:09< hk238> does this seem correct if the idea is to sum the values of a table 20180629 14:51:12< hk238> ? :o 20180629 14:51:29< hk238> I guess there should be some checks that it's the correct kind of item 20180629 14:51:40< hk238> oops there's an extra underscore 20180629 14:56:08< hk238> how do I break a loop if a condition is met? :O 20180629 14:56:50<+discordbot3> just use "break" 20180629 14:57:02< hk238> okay thanks 20180629 14:58:29< hk238> https://pastebin.com/Etat3viX 20180629 14:58:34< hk238> does this seem like it makes sense? :o 20180629 14:59:34<+discordbot3> you don't need a separate end after the break 20180629 15:00:05< hk238> oh okay 20180629 15:03:02-!- gfg [~androirc@tmo-116-79.customers.d1-online.com] has quit [Remote host closed the connection] 20180629 15:04:17< hk238> https://pastebin.com/aE5xFDxN 20180629 15:04:37< hk238> does this seem like it makes sense? :o 20180629 15:05:34-!- gfg [~androirc@tmo-116-79.customers.d1-online.com] has joined #wesnoth 20180629 15:05:39< hk238> the top function with the duration is from the original code 20180629 15:15:08< hk238> hm 20180629 15:15:20< hk238> does a table with keys have order? 20180629 15:15:30-!- DeFender1031 [~DeFender1@93-173-122-186.bb.netvision.net.il] has quit [Quit: I'm not back now.] 20180629 15:15:38< hk238> like is some key considered before or after some other key? 20180629 15:18:38< hk238> I was thinking I'd make an aggregator function that would do (((kโ‚,vโ‚) f (kโ‚‚,vโ‚‚)) f (kโ‚ƒ,vโ‚ƒ)) f (kโ‚„,vโ‚„) .... but it assumes that keys have order 20180629 15:18:57-!- Appleman1234 [~quassel@121.222.147.211] has quit [Ping timeout: 248 seconds] 20180629 15:19:48< hk238> basically the key value pairs would vectors of length two, and f would be a way to sum all the vectors, and aggregator would apply the sum on the vectors 20180629 15:20:29< hk238> so let's say they're all vectors of type (x,y) you could define a function that adds x coordinates, or adds magnitudes or does cross product 20180629 15:21:08< hk238> sum being the operator f 20180629 15:24:55< hk238> but since key value pairs represent a mapping from a key to a value there's no reason to assume there is a predefined order defined by some predicate function that would be transitive 20180629 15:25:56< Soliton> are you a theoretical physicist or mathematician? 20180629 15:26:10< hk238> neither I'm a construction worker :D 20180629 15:26:43< hk238> although i do have an interest in mathematics :o 20180629 15:26:48< Soliton> amazing how much you struggle with simple practical problems. :-P 20180629 15:27:03< hk238> how come? :o 20180629 15:27:39< hk238> you mean because I'm quite bad at lua? :D 20180629 15:27:54< Soliton> you seem to like to overcomplicate things instead of just starting with simple things and extending them. 20180629 15:28:33< hk238> sorry maybe I was getting carried away indeed 20180629 15:28:48< hk238> but do you know the answer to the question that do the keys have order? 20180629 15:29:14< hk238> like if you do the "for key,value in table_name pairs" does it execute in the same order every time? :o 20180629 15:29:42< hk238> and how is that order defined? In the order of declaration? 20180629 15:29:46< hk238> alphabetically? 20180629 15:30:49< Soliton> lua is an existing, established programming language. it has documentation that covers such things. you can probably find the answer in 10 minutes with google. 20180629 15:31:06< hk238> sorry I like asking here though :o 20180629 15:31:11< hk238> i can try googling 20180629 15:31:14<+discordbot3> could also test it out. just insert a bunch of values into a table, then loop over it and see if they come out the same order you put them in. 20180629 15:31:22< Soliton> there you can also find how to use pairs. in case you cannot just use what people told you. 20180629 15:31:47< Soliton> or re-read the documentation you've been pointed at before. 20180629 15:32:03< hk238> :o 20180629 15:32:26< hk238> I just like discussing I guess I could read the manual too 20180629 15:33:28< Soliton> there is not much to discuss about the syntax of a language. unless you want to invent your own. 20180629 15:34:47< hk238> :o 20180629 15:35:07< hk238> okay i found the answer from documents.. apparently the order is undefined which makes sense 20180629 15:41:53< hk238> I guess that means that iterating with pairs is not a function in a formal sense since it has multiple different possible output values for a single input value 20180629 15:42:11< hk238> not that it matters 20180629 16:08:22< Ravana_> ipairs might give you subset of keys, but it does so in deterministic way 20180629 16:08:40< Ravana_> so if you need certain order, design your table to work with ipairs 20180629 16:09:20-!- ibispi [~quassel@188.246.34.98] has quit [Ping timeout: 260 seconds] 20180629 16:09:49-!- Netsplit *.net <-> *.split quits: WesnothServerFan, +discordbot3 20180629 16:09:56-!- Netsplit *.net <-> *.split quits: PjotrOrial 20180629 16:14:13-!- 21WAANAI7 [~discordbo@baldras.wesnoth.org] has joined #wesnoth 20180629 16:14:13-!- Netsplit over, joins: WesnothServerFan, PjotrOrial 20180629 16:14:13-!- ServerMode/#wesnoth [+v 21WAANAI7] by hobana.freenode.net 20180629 16:16:11-!- Amany [~gaspar@194.182.72.59] has quit [Ping timeout: 265 seconds] 20180629 16:17:41-!- louis94 [~~louis94@109.131.34.255] has joined #wesnoth 20180629 16:17:49-!- madmax28 [madmax28ma@gateway/shell/matrix.org/x-hopxeprqnsiaisai] has quit [Ping timeout: 245 seconds] 20180629 16:18:03-!- Haudegen [~quassel@212-186-77-29.static.upcbusiness.at] has quit [Remote host closed the connection] 20180629 16:18:09-!- desttinghim[m] [desttinghi@gateway/shell/matrix.org/x-yuxahizbkrefkgsn] has quit [Ping timeout: 247 seconds] 20180629 16:24:18-!- galegosimpatico [~ec2-user@unaffiliated/ushiu] has quit [Quit: poweroff] 20180629 16:26:59-!- louis94 [~~louis94@109.131.34.255] has quit [Ping timeout: 255 seconds] 20180629 16:30:15-!- marisag [~marisag@2601:640:8200:c597:48a1:5e7f:dd94:4f32] has quit [Ping timeout: 245 seconds] 20180629 16:30:47-!- cyphase [~cyphase@unaffiliated/cyphase] has quit [Ping timeout: 260 seconds] 20180629 16:30:58-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has quit [Ping timeout: 264 seconds] 20180629 16:31:59-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #wesnoth 20180629 16:40:43< hk238> ravana yes it's possible to make it a function like that, and also I wasn't trying to criticize lua for the key order being undefined. Rather that seems most proper, since the key value association inherently does not imply that there should be a preselected ordering of keys 20180629 16:41:07< hk238> I kind of felt like I was being reprimanded there but I think this is interesting not everyone has to be interested of course 20180629 16:41:48< Ravana_> that discussion is more suited for #wesnoth-umc-dev as well 20180629 16:42:14< hk238> oh as an additional point if you have a commutative function then it doesnt matter also 20180629 16:43:05< hk238> okay I'll try and take these lua inquiries on that channel 20180629 17:05:13-!- madmax28 [madmax28ma@gateway/shell/matrix.org/x-zniiichkjmcxwojv] has joined #wesnoth 20180629 17:20:29-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20180629 17:46:36-!- desttinghim[m] [desttinghi@gateway/shell/matrix.org/x-qxvoearaxfilvvix] has joined #wesnoth 20180629 18:02:56-!- marisag [~marisag@2601:640:8200:c597:a163:1238:32b3:87ee] has joined #wesnoth 20180629 18:02:59-!- cyphase [~cyphase@unaffiliated/cyphase] has joined #wesnoth 20180629 18:13:33-!- claymore [~claymore@unaffiliated/claymore] has joined #wesnoth 20180629 18:29:54-!- Haudegen [~quassel@178.115.237.87] has joined #wesnoth 20180629 18:43:07-!- gfg [~androirc@tmo-116-79.customers.d1-online.com] has quit [Ping timeout: 265 seconds] 20180629 19:16:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 19:16:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 19:16:55-!- ibispi [~quassel@188.246.34.98] has joined #wesnoth 20180629 19:17:03-!- Narrat [~Narrat@p5DED1787.dip0.t-ipconnect.de] has joined #wesnoth 20180629 19:28:14<+21WAANAI7> @Yumi i could finish your campain, but i got bored during one scenario 20180629 19:31:24<+21WAANAI7> which one? 20180629 19:54:40-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 19:54:46-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 19:56:05-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20180629 20:01:05-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180629 20:08:43<+21WAANAI7> @VYNLT this campaign is pretty good 20180629 20:09:15<+21WAANAI7> most of my units are just fodder compared to the heroes though 20180629 20:10:14<+21WAANAI7> I found them to be fairly useful if you gave them AMLAs 20180629 20:10:27<+21WAANAI7> but yes, it's hero focused 20180629 20:11:35<+21WAANAI7> I actually decided to choose +3 a couple of times so far 20180629 20:11:37<+21WAANAI7> for the full heal 20180629 20:16:20<+21WAANAI7> maybe I need to rethink how I do their stats ๐Ÿค” 20180629 20:18:22<+21WAANAI7> but guardian angel turns out to be quite a useful ability, and the eventide dancers get really strong if you give them their AMLAs 20180629 20:19:16<+21WAANAI7> I'm not sure how far I got today, I'm at siege of something atm 20180629 20:19:34<+21WAANAI7> that's far, you're more than halfway through 20180629 20:19:40<+21WAANAI7> I've struggled twice so far, once with a puzzle and then with 3x attack demons 20180629 20:19:53<+21WAANAI7> difficulty? 20180629 20:19:58<+21WAANAI7> the middle one 20180629 20:20:21<+21WAANAI7> don't think I'd get far on the hardest one, while playing the basic campaigns I usually had issues completing maps in time 20180629 20:21:44<+21WAANAI7> all I can say is good luck 20180629 20:22:26<+21WAANAI7> you're entering the zone of the "annoying trio" of scenarios that are really weird and tricky 20180629 20:22:28<+21WAANAI7> :p 20180629 20:23:00<+21WAANAI7> well as long as there aren't demons which can 100-0 any unit, it shouldn't be that hard 20180629 20:23:08<+21WAANAI7> ๐Ÿ˜‚ 20180629 20:23:42<+21WAANAI7> ๐Ÿ˜ฅ 20180629 20:23:53<+21WAANAI7> goood luuuuckkkk :)) 20180629 20:24:03<+21WAANAI7> guess I'll need it then :p 20180629 20:24:22<+21WAANAI7> for that one scenario, which you'll know when your enemies start spawning 20180629 20:24:28<+21WAANAI7> I'll give you a heads up right now 20180629 20:24:31<+21WAANAI7> you do not want to fight 20180629 20:24:45<+21WAANAI7> just run; think about everything you need to do to get away as quickly as possible 20180629 20:25:11<+21WAANAI7> the length of the map will tell you that it's a race to just get to the end 20180629 20:25:48<+21WAANAI7> I'll see how it goes, will continue tomorrow 20180629 20:25:57<+21WAANAI7> sounds exciting 20180629 20:54:43-!- louis94 [~~louis94@109.131.34.255] has joined #wesnoth 20180629 21:20:51-!- gfg [~androirc@x4e32b47b.dyn.telefonica.de] has joined #wesnoth 20180629 21:31:55-!- Appleman1234 [~quassel@121.222.147.211] has joined #wesnoth 20180629 21:48:21-!- claymore [~claymore@unaffiliated/claymore] has quit [Quit: Leaving] 20180629 21:56:52-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has joined #wesnoth 20180629 21:57:45-!- gfg [~androirc@x4e32b47b.dyn.telefonica.de] has quit [Ping timeout: 245 seconds] 20180629 22:02:45-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180629 22:02:51-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth 20180629 22:19:46-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has quit [Remote host closed the connection] 20180629 22:19:58-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has joined #wesnoth 20180629 22:27:21-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has quit [Ping timeout: 264 seconds] 20180629 22:28:18-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has joined #wesnoth 20180629 22:33:45-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20180629 22:38:38-!- ibispi [~quassel@188.246.34.98] has quit [Remote host closed the connection] 20180629 22:41:12-!- gfgt [~androirc@x4e32b47b.dyn.telefonica.de] has quit [Remote host closed the connection] 20180629 23:05:21-!- Narrat [~Narrat@p5DED1787.dip0.t-ipconnect.de] has quit [Quit: They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.] --- Log closed Sat Jun 30 00:00:52 2018