Open Captaindando opened 3 years ago
Hello, which game server version do you use, HLDS or ReHLDS or something else? I will take a look into this later.
Hi Kalle, I'm using hlds with these parameters: -game jumbot -console +map crossfire +maxplayers 16 I'm using jumbot to test it out, but I've received the same errors without it. the node app is hosted on the same computer I'm hosting the half life server and I point my log to localhost with a port of 3000 if that helps
just wanted to thank you for developing this, it's a massive help
Hello, I debugged this and found out that your arriving string is malformed.
Examples:
⌂⌂⌂⌂log L 09/01/2021 - 19:31:18: "kalle<1><STEAM_ID_LAN><TERRORIST>" killed "VATB | Jackson_<10><BOT><CT>" with "deagle"
log L 09/01/2021 - 08:14:15: "ryuichi<8>" killed "Billy<10>" with 9mmhandgun
⌂⌂⌂⌂log L 09/01/2021 - 19:34:49: "kalle<1><STEAM_ID_LAN><TERRORIST>" say "say"
����log L 09/01/2021 - 07:55:32: "monkey<1><STEAM_ID_LAN><1>" say "lkjasldjsa"
Obviously, there is a difference, so that's why it fails. Try with the cstrike game parameter and give us the results.
Hi Kalle, I tested it out with the parameter you asked for and here are the results:
'say' works in this case, along with almost every other log, The only error I found was on 'Dropped_The_Bomb'
log L 09/02/2021 - 07:50:37: "Player<1><STEAM_ID_LAN><TERRORIST>" say "laskjdlkjasl"
{
event: 'say',
player: {
name: 'Player',
id: '1',
steamid: 'STEAM_ID_LAN',
side: 'TERRORIST',
message: 'laskjdlkjasl'
},
time: { ss: '37', mm: '50', hh: '07' },
date: { dd: '02', mm: '09', yy: '2021' }
}
log L 09/02/2021 - 07:50:52: "Player<-1><><TERRORIST>" triggered "Dropped_The_Bomb"
Error spotted: TypeError: Cannot read property 'event' of undefined
Error spotted: TypeError: Cannot read property 'event' of undefined
at D:\Google Drive\Half Life Modding\backend app\node_modules\hlds-log\lib\functions.js:58:36
at Array.forEach (<anonymous>)
at HLDS_Log.regexSearch (D:\Google Drive\Half Life Modding\backend app\node_modules\hlds-log\lib\functions.js:55:24)
at Socket.<anonymous> (D:\Google Drive\Half Life Modding\backend app\node_modules\hlds-log\lib\functions.js:44:18)
at Socket.emit (events.js:321:20)
at UDP.onMessage [as onmessage] (dgram.js:924:8)
I think I've found what's causing the errors. It's in the name I started a Half-life game and made it a team game and the errors didn't show up
log L 09/02/2021 - 08:08:38: "Player<1><STEAM_ID_LAN><robo>" say_team "dslfkjkl"
{
event: 'say_team',
player: {
name: 'Player',
id: '1',
steamid: 'STEAM_ID_LAN',
side: 'robo',
message: 'dslfkjkl'
},
In instances where it's a free for all, or if there is a player-caused log entry that is missing a part, it throws an error, for example, lines like these:
log L 09/02/2021 - 07:59:54: "Player<1><STEAM_ID_LAN><1>" say "lakjslkdja"
- Half-life DM with no teams
log L 09/02/2021 - 07:50:52: "Player<-1><><TERRORIST>" triggered "Dropped_The_Bomb"
- Cstrike, the middle 'STEAM_ID_LAN' is missing
Yup, I see where the problem lies. This was tested cstrike only game mode so it fails on other game modes which have their own custom log messages. I will move this from bug to enchantment since I plan on adding a custom class constructor parameter which will be used to determine incoming string type and use the proper parser for it.
I'm getting an error when attempting to log 'say', 'say_team' and 'kill' signals. am I doing something wrong? I've included my code at the end.