Tommah
Member
This is not about uploading to GM: Studio's workshop. I have a game on Steam and am trying to implement workshop with that game for custom levels/maps.
I have the game saving and loading everything just fine, but when I go to upload to our Workshop it gives me an Error and creates an entry in our Workshop with 0.000MB
I have these few lines that help me figure out what's going on in the code:
the "ini_open" is really just to make sure I have the right path and file, which I do. Everything there is fine but the issue is when I use the "set_item_content"...
This is the Debug output:
https://i.gyazo.com/690e88decd150804025cb9949d1232e1.png
As you can see the code successfully saved the file because it opened it up and read the "room name" but when it goes to set the content it "failed to find content directory". What am I doing wrong? I've been working at this way too long.
*Edit 7/22*
I guess I'll provide more information. Tried more debugging attempts, here is the latest:
And here is the output in GM.
Again, it DOES create the entry on my games' workshop, however as an empty file (0.000MB) with the correct title and description. I'm dead set on the "steam_ugc_set_item_content" being the issue but for the life of me don't know why. I can save and load the file perfectly in the editor.
PLE-EASE help
I have the game saving and loading everything just fine, but when I go to upload to our Workshop it gives me an Error and creates an entry in our Workshop with 0.000MB
I have these few lines that help me figure out what's going on in the code:
Code:
steam_ugc_set_item_title(updateHandle,oCustomCursor.Room_Name);
steam_ugc_set_item_description( updateHandle, "testing workshop...");
steam_ugc_set_item_visibility(updateHandle, ugc_visibility_public);
ini_open(levelname); //open test file for reading
var name=ini_read_string("Room Settings","Room Name","???"); //save room name to "name"
show_debug_message("Room Name: "+name); //show room name
steam_ugc_set_item_content(updateHandle,levelname); //upload said file
ini_close(); //close file
requestId=steam_ugc_submit_item_update(updateHandle, "Version 0.1");
show_message("send request: "+string(requestId));
This is the Debug output:
Code:
C:\Users\Tomfr\AppData\Local\gm_ttt_69153\gm_ttt_94365\Custom Maps\Workshop Test.ini
Room Name: Workshop Test
ERROR:failed to find content directory C:\Users\Tomfr\AppData\Local\gm_ttt_69153\gm_ttt_94365\Custom Maps\Workshop Test.ini
As you can see the code successfully saved the file because it opened it up and read the "room name" but when it goes to set the content it "failed to find content directory". What am I doing wrong? I've been working at this way too long.
*Edit 7/22*
I guess I'll provide more information. Tried more debugging attempts, here is the latest:
Code:
steam_ugc_set_item_title(updateHandle,oCustomCursor.Room_Name); //set workshop title
steam_ugc_set_item_description( updateHandle, "testing workshop..."); //set description
steam_ugc_set_item_visibility(updateHandle, ugc_visibility_public); //set visibility
show_debug_message(levelname); //show level file path
var does_exist="File does not Exist!";
if file_exists(levelname) does_exist="File Exists!";
show_debug_message(does_exist); //show whether file exists or not
steam_ugc_set_item_content(updateHandle,levelname); //set file as content
requestId=steam_ugc_submit_item_update(updateHandle, "Version 0.1"); //submit update
show_debug_message("requestId: "+string(requestId)); //show request ID
Code:
C:\Users\Tomfr\AppData\Local\gm_ttt_3970\gm_ttt_36594\Custom Maps\Workshop testing room.ini
File Exists!
ERROR:failed to find content directory C:\Users\Tomfr\AppData\Local\gm_ttt_3970\gm_ttt_36594\Custom Maps\Workshop testing room.ini
requestId: 2
PLE-EASE help
Last edited: