14:21 <+bridge> [ddnet] @heinrich5991 how does your race records file merger work? 14:22 <+bridge> [ddnet] I cant drop the files in, and if I open the script it closes again? 15:51 <+bridge> [ddnet] @fokkonaut try -h, heinrich usually writes the help even for the smallest tools 😛 15:51 <+bridge> [ddnet] If that doesn't work i'd try passing the first file as argv1 and second as argv2 16:03 <+bridge> [ddnet] how 16:03 <+bridge> [ddnet] ah wait 16:04 <+bridge> [ddnet] cat_records.py -blm -BlmapChill_record 16:04 <+bridge> [ddnet] like this? 16:04 <+bridge> [ddnet] wot 16:04 <+bridge> [ddnet] xD 16:05 <+bridge> [ddnet] no 16:05 <+bridge> [ddnet] how 16:05 <+bridge> [ddnet] why dash 16:05 <+bridge> [ddnet] cat_records.py blm BlmapChill_record 16:05 <+bridge> [ddnet] doesnt owrk 16:05 <+bridge> [ddnet] File "C:\Users\Finn\Desktop\cat_records.py", line 68 16:05 <+bridge> [ddnet] print(entry.unparse(), end="") 16:05 <+bridge> [ddnet] ^ 16:05 <+bridge> [ddnet] broked tool 16:06 <+bridge> [ddnet] @heinrich5991 16:06 <+bridge> [ddnet] need help 20:34 <+bridge> [ddnet] Uhm how do javascript ppl write nice functions with return values and this arrow crap everywhere @archimede67 20:34 <+bridge> [ddnet] it gets nested and long so quick 20:35 <+bridge> [ddnet] and if i return i return in the wrong function -.- 20:51 <+bridge> [ddnet] Wt 20:51 <+bridge> [ddnet] Wat 20:53 <+bridge> [ddnet] my code looks ugly 20:53 <+bridge> [ddnet] Show 20:53 <+bridge> [ddnet] how do you properly work with arrow functions that are nested inside other functions 20:53 <+bridge> [ddnet] 20:53 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/615257529651298337/unknown.png 20:54 <+bridge> [ddnet] i mean let error = true; wtf?! 20:54 <+bridge> [ddnet] its the worst and it doenst even work xd 20:55 <+bridge> [ddnet] just do a promise xd 20:55 <+bridge> [ddnet] the arrow function inside gets called first and if (error) is always executed even if error = false is executed xd 20:56 <+bridge> [ddnet] ye logic 20:56 <+bridge> [ddnet] ur query is probably async 20:56 <+bridge> [ddnet] ya seems like 20:56 <+bridge> [ddnet] i tried some .then and stuff but idk how js works xd 20:56 <+bridge> [ddnet] just do a promise that resovles on success and reject on error 20:57 <+bridge> [ddnet] ```js 20:57 <+bridge> [ddnet] function yourfunction(...) { 20:58 <+bridge> [ddnet] return new Promise((resolve, reject) => { 20:58 <+bridge> [ddnet] // some code success 20:58 <+bridge> [ddnet] resolve(result); 20:58 <+bridge> [ddnet] // some code fails 20:58 <+bridge> [ddnet] reject("some error"); 20:58 <+bridge> [ddnet] }); 20:58 <+bridge> [ddnet] } 20:58 <+bridge> [ddnet] ``` 20:58 <+bridge> [ddnet] the u use like this 20:58 <+bridge> [ddnet] ``` 20:58 <+bridge> [ddnet] // in ur code 20:58 <+bridge> [ddnet] yourfunction(...).then(result => console.log(result)).catch(err => console.error(err)); 20:58 <+bridge> [ddnet] ``` 20:58 <+bridge> [ddnet] ```js 20:58 <+bridge> [ddnet] // in ur code 20:58 <+bridge> [ddnet] yourfunction(...).then(result => console.log(result)).catch(err => console.error(err)); 20:58 <+bridge> [ddnet] ``` 20:59 <+bridge> [ddnet] srsyly wtf is this js 20:59 <+bridge> [ddnet] i thought its nice clean and easy 20:59 <+bridge> [ddnet] its fukin easy xd 20:59 <+bridge> [ddnet] this is the most fucked up shit ever xd 20:59 <+bridge> [ddnet] u 20:59 <+bridge> [ddnet] i write my acc system in assembler 20:59 <+bridge> [ddnet] fuck js 20:59 <+bridge> [ddnet] its 2 lines 20:59 <+bridge> [ddnet] also who uses SQL with js 21:00 <+bridge> [ddnet] lamp stack switcher onbos 21:00 <+bridge> [ddnet] i didnt get the value mongoDB serves 21:07 <+bridge> [ddnet] this is not getting better xxxxxxxxxxxxxxxxxxxxxxxxxxxxD 21:08 <+bridge> [ddnet] the promise is also a error function 21:08 <+bridge> [ddnet] arrow 21:08 <+bridge> [ddnet] ya should call them error functions instead hehe 21:10 <+bridge> [ddnet] how do i return values out of my functions if i am always in some arrow function? 21:12 <+bridge> [ddnet] well 21:12 <+bridge> [ddnet] u can use await async 21:12 <+bridge> [ddnet] which is cleaner 21:18 <+bridge> [ddnet] Ye 21:18 <+bridge> [ddnet] u can await a promise 21:18 <+bridge> [ddnet] @ChillerDragon why do u return values in promise 21:19 <+bridge> [ddnet] no the question is why am i in a promise 21:20 <+bridge> [ddnet] i just want to write some code and return values :c 21:20 <+bridge> [ddnet] i mean functions should return something right? 21:20 <+bridge> [ddnet] i thought javascript is such wow functional language 21:20 <+bridge> [ddnet] dude 21:21 <+bridge> [ddnet] the return value is in the .then 21:21 <+bridge> [ddnet] just 21:21 <+bridge> [ddnet] tell me if DB.query is async 21:21 <+bridge> [ddnet] i assume its async 21:21 <+bridge> [ddnet] don't u have source 21:21 <+bridge> [ddnet] i do 21:21 <+bridge> [ddnet] so look 21:22 <+bridge> [ddnet] into it 21:23 <+bridge> [ddnet] tbh idk what tolook at there are a few places in the codebase where the string query occurs 21:23 <+bridge> [ddnet] just look the function `query(...)` 21:23 <+bridge> [ddnet] is it `async` 21:24 <+bridge> [ddnet] or does it return some kind of Promise 21:24 <+bridge> [ddnet] $ grep -nri "query(.*)" | wc -l 21:24 <+bridge> [ddnet] 71 21:25 <+bridge> [ddnet] dude 21:25 <+bridge> [ddnet] just look in the fucking file 😂 21:25 <+bridge> [ddnet] search for the function definition 21:25 <+bridge> [ddnet] not the usages 21:25 <+bridge> [ddnet] idc about usages 21:28 <+bridge> [ddnet] ya idk how js defineds functions i struggle to find it 21:28 <+bridge> [ddnet] dude does vsode ignore node_modules? :c 21:29 <+bridge> [ddnet] 21:29 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/615266462550065238/unknown.png 21:29 <+bridge> [ddnet] no clue if i am looking at the right place but this is not async i guess 21:29 <+bridge> [ddnet] u have a cb function 21:29 <+bridge> [ddnet] lool the whole lib has no async 21:30 <+bridge> [ddnet] ya 21:30 <+bridge> [ddnet] so why do u even put query = Database.DB.query xd 21:30 <+bridge> [ddnet] idk 21:30 <+bridge> [ddnet] ur only solution is to use Promise 21:30 <+bridge> [ddnet] found it online thought it had some meaning 21:30 <+bridge> [ddnet] but i was confused as well 21:31 <+bridge> [ddnet] maybe if u wanna use the query later in ur code but not in urr case 21:31 <+bridge> [ddnet] dude 21:31 <+bridge> [ddnet] just search the lib docs 21:32 <+bridge> [ddnet] ya didnt find those xd 21:32 <+bridge> [ddnet] https://www.npmjs.com/package/mariadb 21:33 <+bridge> [ddnet] this one is good 21:33 <+bridge> [ddnet] no 21:33 <+bridge> [ddnet] yes 21:33 <+bridge> [ddnet] mongodb better 21:33 <+bridge> [ddnet] i used it 21:33 <+bridge> [ddnet] nah 21:33 <+bridge> [ddnet] nosql sucks 21:33 <+bridge> [ddnet] nah 21:33 <+bridge> [ddnet] sql sucks a lot 21:33 <+bridge> [ddnet] nah 21:33 <+bridge> [ddnet] ye 21:33 <+bridge> [ddnet] 21:33 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/615267630898610186/unknown.png 21:33 <+bridge> [ddnet] triggered xd 21:34 <+bridge> [ddnet] bro 21:34 <+bridge> [ddnet] learn fcking promises 21:34 <+bridge> [ddnet] or dont use js 21:34 <+bridge> [ddnet] xd 21:34 <+bridge> [ddnet] i have no clue how to structure my code 21:34 <+bridge> [ddnet] ur triggering me 21:34 <+bridge> [ddnet] 😂 21:34 <+bridge> [ddnet] my functions get suupper big with all these promises and nested 21:35 <+bridge> [ddnet] idk how to improve my style 21:35 <+bridge> [ddnet] u just do things wrongly i guess 21:35 <+bridge> [ddnet] no shit xd 21:36 <+bridge> [ddnet] but how to lean the good way :c 21:36 <+bridge> [ddnet] learn* 21:36 <+bridge> [ddnet] googl 21:36 <+bridge> [ddnet] wat 21:36 <+bridge> [ddnet] google 21:37 <+bridge> [ddnet] wat 21:37 <+bridge> [ddnet] 21:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/615268490647044096/unknown.png 21:37 <+bridge> [ddnet] https://lmgtfy.com/?q=how+to+write+js+code+better 21:38 <+bridge> [ddnet] results dont look promising tbh 21:38 <+bridge> [ddnet] i even bought a book on js xd 21:38 <+bridge> [ddnet] lol 21:38 <+bridge> [ddnet] "book" 21:39 <+bridge> [ddnet] ikr 21:39 <+bridge> [ddnet] books nice 22:21 <+bridge> [ddnet] The best way to write better js turns out to be not using js at all but using ts 22:25 <+bridge> [ddnet] I get really annoyed by the file score of ddnet right now... I havent figured out why but under special conditions it just wont save the score. 22:25 <+bridge> [ddnet] Can anyone look into that? 22:25 <+bridge> [ddnet] It prints the message that you finished and sets your score, but after reconnect or in /rank you see that it didnt get save 22:27 <+bridge> [ddnet] I could not find big differences compared to 9.0.2 (the version ddnetpp is based on) and on @ChillerDragons server file score seems to be working just fine 22:32 <+bridge> [ddnet] https://github.com/ddnet/ddnet/commit/c4af290df5f8280659308746b7539fcb2e402a7f 22:33 <+bridge> [ddnet] This is the only thing that could be causing this issue; it was made after 9.0.2, so chillerdragons mod doesnt have this and it is inside of the save function. @Learath2 Do you have any ideas? 22:33 <+bridge> [ddnet] wait, actually this is in Init() 22:34 <+bridge> [ddnet] still, all other changes applied to file_score.cpp shouldnt affect this 22:38 <+bridge> [ddnet] Or can it be caused by changes to teams.cpp? 22:42 <+bridge> [ddnet] so you are sure the script worked fine? The rank is included in the merged database? But when the server starts it deletes the rank? Or does it stay in the database and is not loaded? 22:44 <+bridge> [ddnet] why are you weird 22:44 <+bridge> [ddnet] I havent used any script 22:44 <+bridge> [ddnet] Read my text and then you know the problem 22:44 <+bridge> [ddnet] The score is not being saved On finish 22:44 <+bridge> [ddnet] but only Sometimes 22:45 <+bridge> [ddnet] has nothing to do with heinrichs scripts, I havent used it yet since I need python 3 first 22:47 <+bridge> [ddnet] Oh thought its still about the db merge 22:48 <+bridge> [ddnet] What do you mean by special conditions? Something you can reproduce? 22:48 <+bridge> [ddnet] I dont know when it happens 22:48 <+bridge> [ddnet] hmm 22:48 <+bridge> [ddnet] how often? 22:49 <+bridge> [ddnet] sometimes when I start the server and finish it works, and if i come back after some minutes it doesnt work anymore 22:49 <+bridge> [ddnet] Too often,l 22:50 <+bridge> [ddnet] just try plain ddnet wit file score on a linux server 22:50 <+bridge> [ddnet] after finish check /rank 22:51 <+bridge> [ddnet] And if it shows your rank, reconnect with anothsr name and try again, if it also works wait some minutes or an hour and try it again 22:51 <+bridge> [ddnet] with a new name ofc 23:44 <+bridge> [ddnet] about 20 mins ago there was a ddos on ger and as a aftereffect of the ddos i started having those 'phantom lags' i talked about earlier (https://discordapp.com/channels/252358080522747904/293493549758939136/611160075201151004) 23:49 <+bridge> [ddnet] I think i have the same problem Patiga 23:50 <+bridge> [ddnet] few minutes i'm fine, then i completly lag and i can't do shit for about 3/4 secondes 23:50 <+bridge> [ddnet] few minutes i'm fine, then i completly lag and i can't do shit for about 3/4 seconds 23:50 <+bridge> [ddnet] just in ddnet ger servers 23:50 <+bridge> [ddnet] but i don't play in ddnet rus so i don't know if it's just ger or all ddnet servers