Open Alamer99 opened 8 years ago
This is a known issue with how we handle conditionals - see #232.
I Dont Want To Sound Like a Stupid But
Have You Ever Checked Valve's KeyValues.h And KeyValues.cpp
I Know Its C++ But Maybe You Could Find Something
Yes. This code is almost a 1:1 port of that.
Interestingly, it's conditional handling is virtually hardcoded, and looks to be somewhat out of date with the latest conditional options (e.g. $PS3).
in my opinion hardcoded conditional is better you dont expect someone to be using SteamKit2 on Xbox/PS3 Right?
No, but somebody using SteamKit might want to extract Xbox/PS3 data, or even Linux data when running on Windows, etc.
good point however (not a c++ expert :P) i noticed by reading valve's keyvalues they hardcoded it as _WIN32 so if we change it to _PS3 or _X360 that means it will extract the data we want right? if that works then maybe you can do it that way, make it hardcoded but the user can select which one he wants? (again i'm not a c++ expert that's just what came into my mind :) )
For anyone looking, this is supported in https://github.com/SteamDatabase/ValveKeyValue
And poorly in https://github.com/SteamRE/SteamKit/pull/684 😅
Heres My Code:
static void Main(string[] args) { KeyValue csgo_english = new KeyValue(); csgo_english.ReadFileAsText(@"C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\resource\csgo_english.txt"); }
It Ends Up With An Error