Announcement

Collapse
No announcement yet.

UnrealScript IDE for Sublime Text 2 / 3 | Update: Content Assist

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    A temp solution for the log could be having sublime open the log file (you could just get the latest log file since the files all get timestamps) once udk closes, provided you can detect that (you could get the log location by the project folder). The log has always been a bit of a pain - another issue you'll find is that if your game crashes, when you check the log its only logged about half of the console-log as UDK has some sort of write delay. However - if udk does crash you can leave it open and switch back to the log. Normally you can read it even if the it does white with the windows not responding thing. For this to be effective you should make the log as big as you can before UDK crashes, since you cant resize it after.

    Comment


      In the picture I can only see the console output of UDK, not the one from sublime itself. Yes, sublime will also show you udk's output in its console, but there is another console window which shows sublimes output log. That's the one I'm after.
      To view this one you'll have to go to: 'view' -> 'show console'. This will open sublimes console. This might look like this:
      Code:
      compiling with: Win32\UDK.com and -debug -unattended -full
      cmd /C "C:\UDK\UDK-2013-02\Binaries\Win32\UDK.com" make -debug -unattended -full
      ...
      (possibly an error on your side...)

      Comment


        Aaaah okay, I see, didn't know that. Yep, apparantly there are some things wrong. Here is the "right" console output:

        Code:
        DPI scale: 1
        startup, version: 3059 windows x64 channel: stable
        executable: /E/Programme/Sublime Text 3/sublime_text.exe
        working dir: /E/Programme/Sublime Text 3
        packages path: /C/Users/Nicolas/AppData/Roaming/Sublime Text 3/Packages
        state path: /C/Users/Nicolas/AppData/Roaming/Sublime Text 3/Local
        hardware concurrency: 8
        zip path: /E/Programme/Sublime Text 3/Packages
        zip path: /C/Users/Nicolas/AppData/Roaming/Sublime Text 3/Installed Packages
        found 4 files for base name Default.sublime-keymap
        found 2 files for base name Default.sublime-mousemap
        found 3 files for base name Main.sublime-menu
        loading bindings
        loading pointer bindings
        found 1 files for base name Default.sublime-theme
        theme loaded
        app ready
        startup cache, total files: 155 cache hits: 155
        pre session restore time: 0.576457
        startup time: 0.664458
        first paint time: 0.665458
        launching: /E/Programme/Sublime Text 3/plugin_host.exe
        unable to auto detect encoding for E:\UDK\UDK-MA\UDKGame\Logs\Launch.log, using fallback encoding Western (Windows 1252)
        loaded 863 snippets
        reloading plugin Default.block
        reloading plugin Default.comment
        reloading plugin Default.copy_path
        reloading plugin Default.delete_word
        reloading plugin Default.detect_indentation
        reloading plugin Default.duplicate_line
        reloading plugin Default.echo
        reloading plugin Default.exec
        reloading plugin Default.fold
        reloading plugin Default.font
        reloading plugin Default.goto_line
        reloading plugin Default.history_list
        reloading plugin Default.indentation
        reloading plugin Default.kill_ring
        reloading plugin Default.mark
        reloading plugin Default.new_templates
        reloading plugin Default.open_file_settings
        reloading plugin Default.open_in_browser
        reloading plugin Default.pane
        reloading plugin Default.paragraph
        reloading plugin Default.paste_from_history
        reloading plugin Default.save_on_focus_lost
        reloading plugin Default.scroll
        reloading plugin Default.set_unsaved_view_name
        reloading plugin Default.side_bar
        reloading plugin Default.sort
        reloading plugin Default.swap_line
        reloading plugin Default.switch_file
        reloading plugin Default.symbol
        reloading plugin Default.transform
        reloading plugin Default.transpose
        reloading plugin Default.trim_trailing_white_space
        reloading plugin CSS.css_completions
        reloading plugin Diff.diff
        reloading plugin HTML.encode_html_entities
        reloading plugin HTML.html_completions
        reloading plugin Package Control.Package Control
        reloading plugin UnrealScriptIDE.UnrealBuildSystem
        reloading plugin UnrealScriptIDE.UnrealDebuggerIntegration
        reloading plugin UnrealScriptIDE.UnrealScriptIDEClassBrowser
        reloading plugin UnrealScriptIDE.UnrealScriptIDEData
        reloading plugin UnrealScriptIDE.UnrealScriptIDEGoToDeclaration
        reloading plugin UnrealScriptIDE.UnrealScriptIDEMain
        reloading plugin UnrealScriptIDE.UnrealScriptIDEParser
        plugins loaded
        startup: start parsing classes...
        cache exists. Loading classes from memory
        finished parsing classes, start parsing current file
        Package Control: No updated packages
        start parsing file:  E:\UDK\UDK-MA\Development\Src\Anreal\Classes\AnrealGame.uc
        already parsed:  E:\UDK\UDK-MA\Development\Src\Anreal\Classes\AnrealGame.uc
        compiling with: Win64\UDK.com and -debug -unattended
        cmd /C "E:\UDK\UDK-MA\Binaries\Win64\UDK.com" make -debug -unattended
        Traceback (most recent call last):
          File "E:\Programme\Sublime Text 3\sublime_plugin.py", line 543, in run_
            return self.run(edit, **args)
          File "UnrealDebuggerIntegration in C:\Users\Nicolas\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package", line 137, in run
          File "UnrealDebuggerIntegration in C:\Users\Nicolas\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package", line 141, in install_debugger
        FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Nicolas\\AppData\\Roaming\\Sublime Text 3\\Packages\\UnrealScriptIDE\\Debugger\\UnrealDebugger 64 bits\\*.*'
        Reloading /E/UDK/UDK-MA/UDKGame/Logs/Launch.log
        Reloading /E/UDK/UDK-MA/UDKGame/Logs/Launch.log
        everything's fine!
        reloading Packages/User/UnrealScriptIDE.sublime-settings
        Reloading /C/Users/Nicolas/AppData/Roaming/Sublime Text 3/Packages/User/UnrealScriptIDE.sublime-settings
        Reloading /E/UDK/UDK-MA/UDKGame/Logs/Launch.log

        Comment


          Ahhh! I think I know what's going on there.
          The problem is that Sublime Text 3 installs packages inside a .zip file, not in a folder as Sublime Text 2 used to do.
          So it seems like I've forgotten this when I ported the code from ST2 to ST3.
          It still works on my pc, because I still have it inside a folder and not as an installed package.

          I could work on a fix, but you'd have to wait approximately 3 weeks, then I'd have a bit more freetime.


          As a temporary solution for now, you could unzip the file at: "C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package" (using 7zip or similar) and move the unziped files to: "C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\UnrealScriptIDE\". (you'll have to create this folder)
          After that, you might also need to delete the "C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package" file. (or change it's extension)

          Then it should work.

          Comment


            Originally posted by zinggi57 View Post
            Ahhh! I think I know what's going on there.
            The problem is that Sublime Text 3 installs packages inside a .zip file, not in a folder as Sublime Text 2 used to do.
            So it seems like I've forgotten this when I ported the code from ST2 to ST3.
            It still works on my pc, because I still have it inside a folder and not as an installed package.

            I could work on a fix, but you'd have to wait approximately 3 weeks, then I'd have a bit more freetime.


            As a temporary solution for now, you could unzip the file at: "C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package" (using 7zip or similar) and move the unziped files to: "C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\UnrealScriptIDE\". (you'll have to create this folder)
            After that, you might also need to delete the "C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package" file. (or change it's extension)

            Then it should work.
            This way it is easier to read

            As a temporary solution for now, you could unzip the file at (using 7zip or similar):
            C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package
            and move the unziped files to (you'll have to create this folder):
            C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\UnrealScriptIDE\
            After that, you might also need to delete the following file (or change it's extension)
            C:\Users\***\AppData\Roaming\Sublime Text 3\Installed Packages\UnrealScriptIDE.sublime-package

            Edit: For some reason backslashes become pipes in quotes.

            Comment


              Hey G-Rath, zinggi57 and 100GPing100,

              thank you everyone very much for your help! The solutions works for me and the reason in worked on my other machine, apparently, was that at first I installed sublime Text 2 and UnrealScriptIDE, then uninstalled Sublime Text 2 and installed Sublime Text 3. On my (until now) not working Installation I just installed Sublime Text 3. So this is were the Files were missing in the first place, as you guessed right. Your solution works perfectly and I will now use sublime text for my daily use.

              Zinggi: Viel Glück bei deinen Prüfungen/Good Luck for your exams!

              Comment


                Yep, on your other machine you already had the debugger installed because of ST2, so it worked.
                I'll promise to fix this installation issue when I've got more time, since it's quite a big problem and I'm surprised no one noticed that before.

                Thanks for crossing your fingers for me

                Comment


                  This is my first time posting here, first of all let me tell you that I love this tool.
                  Second... it's giving me trouble. I'm using it at a japanese game company, and I have to use UTF-8 converter in sublime text. (sometimes it bugs out and doesn't save correctly, making the comments vanish in japanese)
                  it's been working well until like 2-3 weeks ago, where suddenly building the cache didn't bring up any auto-complete suggestions.

                  Finally I decided to investigate the problem. It seems that the it is with the japanese comments themselves.
                  (I'm not at work so I can't paste the log)
                  it roughly said that at position whatever, the byte 0x84 (which is just a simple space?, not even using the japanese characters) can't be read.

                  filenames and everything that is code uses only regular ascii characters, and it compiles perfectly.
                  I'm sorry that I don't have more details, I will try to post more soon. But I just wanted to comment this to you in case you could easily spot the problem

                  it was breaking at a line like this one:
                  /// @brief: この関数は何何々

                  one possible problem is that it's trying to read bytes 1 by 1, and... well, they come in pairs.
                  It's just an idea...

                  another possibility is japanese spaces, hard to spot... here's one: [ ] but I replaced all of them with the regular ones [ ]
                  I doubt this is though, since it won't compile when there are white spaces like that in the code.
                  Anyways, thank you again, and I hope You can help, and I hope this helped you. I will post more information on the problem tomorrow.

                  Comment


                    @stromchin: Could you post the log after the error occurs? Also are those characters all valid UTF-8 characters?
                    I hope it's a simple fix, otherwise I fear I wont have time for it.

                    The issue discovered by @Nanovarium should be fixed now,
                    package control should no longer package my files inside a .sublime-package file.

                    [EDIT]: I don't know what happens if you already have it installed for ST3 (therefore stored inside a .sublime-package file) and now it should come just inside a folder. I hope you wont have any issues because of that.

                    Comment


                      I don't know much about python, but after looking at my error, it seems to be pretty common. It certainly happens because there is some byte that python doesn't like.
                      Because it's not the right encoding.

                      http://stackoverflow.com/questions/1...odeencodeerror
                      this was basically the same error, after looking at the code for unrealscriptIDE, I fixed it changing these:

                      Code:
                      open(file_name, 'rU')
                      in all the files being opened in UnrealScriptIDEParser.py (3 times) for this:
                      Code:
                      codecs.open(file_name, mode='rU', errors='replace', encoding='cp949')
                      also adding the line:
                      Code:
                      import codecs
                      at the top

                      I don't know if this screws up other things, but I got autocompletion back.
                      the replace part changes the illegal bytes for some blank bytes instead (don't quote me on this).
                      Since those bytes aren't necessary, strictly speaking, because they are probably something wrong in the comments, then it's ok.
                      This is also a bad practice it seems, since it could lead to "security errors" while making a website, but kind of irrelevant here.
                      It also allows it to continue.

                      I hope this helps for something, or at least other people trying to use this with japanese encoding, or some other weird encodings.

                      edit: I can't seem to make it work for sublime text 3, it works on sublime text 2... I'm just renaming the package to .zip, editing the file, then zipping it back, and renaming back to what it was... I guess I'm doing it wrong?

                      p.s. errors='ignore' didn't work because those bytes were being read in lots of places and raising a lot of other errors.
                      p.s.2 other programs handle japanese language much worse than sublime text. The best one so far is visual studio in my opinion. But nfringe is kind of expensive

                      Comment


                        Very good and nice simple solution!
                        If I find some time I'm going to implement that as an alternative so you could specify the encoding inside the settings.
                        It definitely wont be the default setting, since this most likely screws up some other languages.

                        Regarding ST3:
                        Since ST3 uses Python 3, the
                        Code:
                        import codecs
                        line can be removed and this line
                        Code:
                        codecs.open(file_name, mode='rU', errors='replace', encoding='cp949')
                        can be simply replaced by
                        Code:
                        open(file_name, mode='rU', errors='replace', encoding='cp949')
                        .

                        Comment


                          Excellent! Thanks

                          Comment


                            Originally posted by zinggi57 View Post
                            Very good and nice simple solution!
                            If I find some time I'm going to implement that as an alternative so you could specify the encoding inside the settings.
                            It definitely wont be the default setting, since this most likely screws up some other languages.

                            Regarding ST3:
                            Since ST3 uses Python 3, the
                            Code:
                            import codecs
                            line can be removed and this line
                            Code:
                            codecs.open(file_name, mode='rU', errors='replace', encoding='cp949')
                            can be simply replaced by
                            Code:
                            open(file_name, mode='rU', errors='replace', encoding='cp949')
                            .
                            that's great, thank you.
                            it didn't work without the import and codec for me, because I was testing it in ST2.
                            Thanks for looking into it. Encodings can be a B***

                            Comment

                            Working...
                            X