Web error after 1/19/16 gmod update #242
Comments
This week's patch notes util.TableToJSON handles arrays properly Pretty sure it has something to do with that |
@EstevanTH Any chance you could retake a look at this. |
Neutron have same problem... http://i.imgur.com/Fy1iDri.png |
interesting, let me know if a fix comes out for it so I can cross reference, I dont have access to that script currently. I pulled the decoded json from php and it looks right... but i'm not sure what it looked like before the update and have no way to look. I have next to 0 experience with json and php so im struggling through it |
Hello, |
It would be easy to fix the PHP script, but I think the old logs are lost without any migration to the "new" format. |
I think that the script does not decode valid information while doing $round_info['damagelog'] = json_decode($round_info['damagelog'], true); |
@EstevanTH I'm not sure if this helps at all I put this in a file which displays this Are you able to tell if that is correct or not? |
Can I see the damagelog page for the date you chose to display in your link? |
Here is the link its round 8 4:26 am tttminecraft_mythic_sg_b9 (3:58 AM) on the 24 of january 2016 |
A failing example: [3]=>
array(5) {
["round"]=>
int(8)
["infos"]=>
array(9) {
[0]=>
string(13) "Unpaid Intern"
[1]=>
int(1)
[2]=>
string(7) "jwjg672"
[3]=>
int(0)
[4]=>
int(9)
[5]=>
string(14) "weapon_ttt_m16"
[6]=>
string(18) "STEAM_0:1:123456"
[7]=>
string(19) "STEAM_0:1:234567"
[8]=>
int(9)
}
["id"]=>
int(1)
["type"]=>
string(3) "DMG"
["time"]=>
int(60)
} A working example: [4]=>
array(5) {
["round"]=>
int(8)
["infos"]=>
array(10) {
[2]=>
int(0)
[5]=>
int(200)
[4]=>
int(0)
[9]=>
int(200)
[8]=>
string(18) "STEAM_0:0:123456"
[3]=>
string(15) "BlackWolf-TFMV-"
[7]=>
string(19) "STEAM_0:1:234567"
[1]=>
string(7) "jwjg672"
["icon"]=>
array(1) {
[0]=>
string(22) "icon16/exclamation.png"
}
[6]=>
string(15) "weapon_zm_rifle"
}
["id"]=>
int(1)
["type"]=>
string(3) "DMG"
["time"]=>
int(62)
} I regret that this happens. I do not remember what the JSON data look like. $round_info['damagelog'] = json_decode($round_info['damagelog'], true); |
@EstevanTH I believe that is what you are asking for |
I added tabs and new lines to make the JSON data readable. {
"ShootTable":
{
"6":[
[
"Weegee",
"weapon_zm_molotov"
]
],
"9":[
[
"jwjg672",
"weapon_zm_revolver"
]
],
"12":[
[
"jwjg672",
"weapon_zm_revolver"
]
],
"13":[
[
"jwjg672",
"weapon_zm_revolver"
]
],
"14":[
[
"jwjg672",
"weapon_zm_revolver"
]
],
"67":[
[
"Unpaid Intern",
"weapon_zm_shotgun"
]
],
"84":[
[
"Unpaid Intern",
"weapon_zm_shotgun"
]
],
"83":[
[
"Unpaid Intern",
"weapon_zm_shotgun"
]
],
"62":[
[
"BlackWolf-TFMV-",
"weapon_zm_rifle"
]
],
"24":[
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
]
],
"23":[
[
"jwjg672",
"weapon_ttt_m16"
]
],
"60":[
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
]
],
"57":[
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
]
],
"66":[
[
"Unpaid Intern",
"weapon_zm_shotgun"
]
],
"56":[
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
]
],
"61":[
[
"jwjg672",
"weapon_ttt_m16"
]
],
"59":[
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
],
[
"jwjg672",
"weapon_ttt_m16"
]
]
},
"Infos":
{
"BlackWolf-TFMV-":
{
"role":0,
"steamid64":"76561198140000000",
"steamid":"STEAM_0:1:123456"
},
"Unpaid Intern":
{
"role":1,
"steamid64":"76561198140000000",
"steamid":"STEAM_0:1:123456"
},
"Weegee":
{
"role":0,
"steamid64":"76561198140000000",
"steamid":"STEAM_0:1:123456"
},
"jwjg672":
{
"role":0,
"steamid64":"76561198140000000",
"steamid":"STEAM_0:1:123456"
}
},
"DamageTable":[
{
"round":8,
"infos":[
"Unpaid Intern",
1,
"STEAM_0:1:123456",
2,
2
],
"id":8,
"type":"WEP",
"time":3
},
{
"round":8,
"infos":[
"Unpaid Intern",
1,
"STEAM_0:1:123456",
1,
1
],
"id":8,
"type":"WEP",
"time":5
},
{
"round":8,
"infos":[
"Weegee",
0,
"weapon_zm_molotov",
"STEAM_0:1:123456"
],
"id":6,
"type":"NADE",
"time":6
},
{
"round":8,
"infos":[
"Unpaid Intern",
1,
"jwjg672",
0,
9,
"weapon_ttt_m16",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
9
],
"id":1,
"type":"DMG",
"time":60
},
{
"round":8,
"infos":
{
"2":0,
"5":200,
"4":0,
"9":200,
"8":"STEAM_0:1:123456",
"3":"BlackWolf-TFMV-",
"7":"STEAM_0:1:123456",
"1":"jwjg672",
"icon":[
"icon16/exclamation.png"
],
"6":"weapon_zm_rifle"
},
"id":1,
"type":"DMG",
"time":62
},
{
"round":8,
"infos":[
"BlackWolf-TFMV-",
0,
"jwjg672",
0,
"weapon_zm_rifle",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
73
],
"id":4,
"type":"KILL",
"time":62
},
{
"round":8,
"infos":[
"BlackWolf-TFMV-",
0,
"Unpaid Intern",
1,
67,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
67
],
"id":1,
"type":"DMG",
"time":66
},
{
"round":8,
"infos":[
"BlackWolf-TFMV-",
0,
"Unpaid Intern",
1,
55,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
55
],
"id":1,
"type":"DMG",
"time":67
},
{
"round":8,
"infos":[
"Unpaid Intern",
1,
"BlackWolf-TFMV-",
0,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
74
],
"id":4,
"type":"KILL",
"time":67
},
{
"round":8,
"infos":
{
"2":1,
"5":"weapon_ttt_flaregun",
"3":"STEAM_0:1:123456",
"1":"Unpaid Intern"
},
"id":8,
"type":"WEP",
"time":75
},
{
"round":8,
"infos":[
"Weegee",
0,
"Unpaid Intern",
1,
55,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
55
],
"id":1,
"type":"DMG",
"time":83
},
{
"round":8,
"infos":[
"Weegee",
0,
"Unpaid Intern",
1,
78,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
78
],
"id":1,
"type":"DMG",
"time":84
},
{
"round":8,
"infos":[
"Unpaid Intern",
1,
"Weegee",
0,
"weapon_zm_shotgun",
"STEAM_0:1:123456",
"STEAM_0:1:123456",
75
],
"id":4,
"type":"KILL",
"time":84
}
]
} I need some time to understand what the failure is. |
Okay, the failure is easy to understand. When I made the PHP script, everything was probably in the integer-to-string format, that's why only events containing integer-to-string keys are displayed properly. |
So this is just a issue with the PHP script formatting? Any chance you could fix it? |
Can you try now? I have justed updated sh_events.lua |
Yep, that fixed it. At least on the web, i'll check ingame to make sure later tonight. If only I knew the fix was that easy. Thanks! |
As far as I can tell everything seems good. |
Fixed for me |
http://imgur.com/xbxvM2L
This started happening right after the most recent gmod updates where it sometimes will append the steamid to the end and not show the names of players.
I checked and my damagelogs are fine before tuesday and this started happening afterwords.
http://assets-1.joinsg.net/tttdamage/index.php?static&round_list=21021&map_loaded_list=21018_21021&day_list=2016_1_19&month_list=2016_1&year_list=2016
Anyone having this issue and fixed this already?
The text was updated successfully, but these errors were encountered: