Argon - Full featured tool for Roblox development

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.

And again, thank you for your work with Argon.

Perhaps, turn on the “Only Code Mode” in the settings?

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
image

That’s probably a bug, and this plugin isn’t perfectly released. Maybe try playing around with the features?

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
1 Like

Depends on if it’s an array or a table. If it’s

{ a,b,c,d } then #tbl works, but if its { "a" = 1, "b" = 2, "c" = 3} etc then you gotta count it IIRC.

Is there a github repo for the plugin? I was looking at it earlier and ended up just copying the rbxm from my own installation.

Repo

Oof must have missed the plugin folder. Thanks!

1 Like

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.

Suggestion
How about backwards compatability with rojo

Okay so let’s start with this:

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.

2 Likes

I mean
performace is not a necessity as long as it never becomes a problem to anyone

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.

2 Likes

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.

Argon 0.3.4

Changes:

  • Fixed bug reported by @Plasmanode that caused errors when porting “StarterPlayer” to VSC
  • Fixed bug reported by @Plasmanode that caused descendants of the scripts being overwritten
  • Fixed source code being ported twice (from VSC to Roblox)
  • Fixed script source not porting in some cases
  • Porting source code takes less time
  • All plugin icons are now preloaded
  • Minor UI changes

@plasma_node I fixed all of the issues you reported (thank you for helping!), I implemented method you described. Take a look:

No more overwriting child instances!

No more errors!

Also @AridTheDev I got this cannot resume dead coroutine error again even tho it is inside pcall. So I googled it and look what I’ve found:

So it looks like I can’t do anything about it. :frowning:

2 Likes

You rock!!

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.

Oh, I literally fixed this bug a few updates ago. I must have messed something up in the meantime.

Gonna fix that tomorrow!

1 Like

Oh I just updated so that might have fixed it. Nvm

Looks like it’s a Roblox bug, so nothing you can do about it. So, will you change the pcall to if for performance?