uspgamedev / luasteam

Bindings to connect lua with Steam API
https://luasteam.readthedocs.io/en/stable/
MIT License
134 stars 25 forks source link

provide more reasons why SteamAPI_Init might fail #42

Closed ntauch closed 4 months ago

ntauch commented 4 months ago

I was helping my brother with his project, which uses luasteam, but couldn't get it to run initally. I would always receive the following error:

[S_API] SteamAPI_Init(): Loaded '/home/nkt/.local/share/Steam/linux64/steamclient.so' OK. [S_API FAIL] SteamAPI_Init() failed; connect to global user failed.Couldn't connect to steam... Do you have Steam turned on? If not running from steam, do you have a correct steam_appid.txt file?

I had steam up and running and the steam_appid.txt had the correct app ID, so this wasn't it. After digging through the documentation in steam_api.rst, I found several additional reasons, why this error could occur. It eventually turned out I was simply missing the product in my steam account, which was easy to remedy.

I suggest amending the existing error message with the additional information, which could help future users troubleshoot this problem more effectively 😊.