Tbh the only reason I port to Roblox is because sometimes I leave Argon off by mistake and don’t want to have to go back and ctrl + s in all of the scripts I changed, and recreate what I did in argon back in roblox.
I think a great solution would just be a separate sync button that only syncs code & folder changes/ignores other instances.
It is. If there is an object parented to a script and I have that on, it just deletes it. Also, when I sync to vscode in the latest version I get this error
Checked the plugin code, and this is a problem with the StarterPlayer scripts checking. The error is from a function named len where he gets the length of the array.
local function len(array)
local index = 0
for _, _ in pairs(array) do -- Errors in this line, since there's no `if` statement checking if the array is nil or not
index += 1
end
return index
end
Sorry to change the topic, but @Dervex, #array would’ve worked, right?
if len(instancesToSync['StarterPlayer']['StarterCharacterScripts.StarterCharacterScripts']) == 0 then
instancesToSync['StarterPlayer']['StarterCharacterScripts.StarterCharacterScripts'] = nil
end
if len(instancesToSync['StarterPlayer']['StarterPlayerScripts.StarterPlayerScripts']) == 0 then
instancesToSync['StarterPlayer']['StarterPlayerScripts.StarterPlayerScripts'] = nil
end
if len(instancesToSync['StarterPlayer']) == 0 then
instancesToSync['StarterPlayer'] = nil
end
You could’ve just used
if (#instancesToSync['StarterPlayer']['StarterPlayerScripts']) == 0 then
instances['StarterPlayer']['StarterPlayerScripts'] = nil -- And that's the same result right? Please correct me if I'm wrong.
end
Hmm, now it makes sense because the indexes are string type. Thanks for the explanation. [For Dervex after this,] But, I’d recommend adding ifs OR you might use promises. It depends on how you want to implement the code into the plugin though.
current port to Roblox option should not overwrite existing instances so once I fix it, new option won’t be needed.
So now that error:
I think it happens when you try to port to VS when “StarterPlayer” service is not synced.
I will have to fix that by adding if statement not inside len function but right there:
Now len function, @AridTheDev don’t worry I know that # exists however you can’t use is when indexes are not numerical as @plasma_node said.
So today I will release update that fixes all of these problems but after I come back home.
I don’t have plans for that as it uses completely different file structure (init, meta files). It is technically possible but it would require to adding tons of statements which is not a good thing for performance.
I want to keep Argon as performant as possible so I won’t add support for rojo. If you really want to use rojo with Argon just port rojo project to Roblox and then to Argon.
I am personally a very big fan of VSC over Rojo, mainly because of reliability and looks. Will definitely use in the future. I just wish it was a little less complicated to set-up.
Thanks for fixing those issues. Also fyi there is another bug in which sometimes the UI breaks and you have to close and open the plugin again to be able to click any of the buttons.