Raised This Month: $12 Target: $400
 3% 

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
LegacyCode
Member
Join Date: Apr 2017
Old 04-08-2017 , 16:47   Fix Syntax Highlighting
Reply With Quote #51

//edit: I should read the whole thread, maybe.

Last edited by LegacyCode; 04-08-2017 at 16:50.
LegacyCode is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-15-2017 , 05:43   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #52

any idea wtf happened here ?

PHP Code:

Files
\HLDS\cstrike\addons\amxmodx\scripting\layer.sma""=="" was unexpected at this time.
[
Finished in 0.3s with exit code 255]
[
cmd: ['E:\\Program Files\\HLDS\\ide\\Data\\Packages/Amxx Pawn/AmxxPawn.bat''E:\\Program Files\\HLDS\\cstrike\\addons\\amxmodx\\scripting\\layer.sma''layer''E:\\Program Files\\HLDS\\ide\\Data\\Packages''E:\\Program Files\\HLDS\\cstrike\\addons\\amxmodx\\scripting']]
[
dirE:\Program Files\HLDS\cstrike\addons\amxmodx\scripting]
[
pathC:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Angel\AppData\Local\Microsoft\WindowsApps
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-15-2017 , 13:30   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #53

Quote:
Originally Posted by Depresie View Post
any idea wtf happened here ?
I am not sure yet.
  1. Does this happens every time, for every file, or just for that plugin?
  2. Can you enable the debug mode on the `AmxxPawn.bat` file, run it again and post here the full output?
To enable debug mode, you need to edit the `AmxxPawn.bat` and remove its third line `@echo off`, or just change it to `@echo on`:
Code:
File: Packages\Amxx Pawn\AmxxPawn.bat 1: 2: 3: @echo off 4: 5: rem AMXX Plugin Compiler Script 6: rem ...
To open the `AmxxPawn.bat` you can press `Ctrl+Shift+P` and type `amxx conf bat` on the command palette:



For reference I found this other thread about the error 255:
  1. https://social.msdn.microsoft.com/Fo...-with-code-255
It seems the `.bat` file is not finding the file. I think is it a missing "" double quotes on a file path with spaces.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 06-15-2017 at 13:33.
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-15-2017 , 13:42   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #54

Happens every time with every plugin =\

PHP Code:
E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem AMXX Plugin Compiler Script 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  This program is free softwareyou can redistribute it and/or modify it 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  under the terms of the GNU General Public License as published by the 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  Free Software Foundationeither version 2 of the License, or ( at 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  your option any later version

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  This program is distributed in the hope that it will be usefulbut 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  WITHOUT ANY WARRANTYwithout even the implied warranty of 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  See the GNU General Public License for more details

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  You should have received a copy of the GNU General Public License 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem  along with this program.  If notsee <http://www.gnu.org/licenses/>. 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Get the current date to the variable CURRENT_DATE 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>for /%i in ('date /T') do set CURRENT_DATE=%

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set CURRENT_DATE=Thu 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem The format of 20:41:36.80 is HH:MM:SS,CS for example 23:59:59,99 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo.


E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo Compiling layer... Current time is20:41:36.80 Thu 
Compiling layer
... Current time is20:41:36.80 Thu

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo.


E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Put here the paths to the folders where do you want to install the plugin

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem You must to provide at least one folder

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set folders_list[0]=E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Where is your compiler

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Example

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem F:/SteamCMD/steamapps/common/Half-Life/czero/addons/amxmodx/scripting/amxxpc.exe 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set AMXX_COMPILER_PATH=E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\amxxpc.exe 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Components

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Time calculation downloaded from

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem http://stackoverflow.com/questions/9922498/calculate-time-difference-in-windows-batch-file 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem AMX Mod X compiling batch downloaded from

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem https://github.com/alliedmodders/amxmodx/pull/212/commits 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Here begins the command you want to measure 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>for /"tokens=1-4 delims=:.," %a in ("20:41:36.81") do (set /"start=(((%a*60)+1%b % 100)*60+1%c % 100)*100+1%d % 100" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>(set /"start=(((20*60)+141 % 100)*60+136 % 100)*100+181 % 100" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem "E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma" is the first shell argument and layer is the second shell argument passed by AmxxPawn.sublime-build 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Usually they should be the plugin's file full path and the plugin's file name without extension

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Example"E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma"="F:\SteamCMD\steamapps\common\Half-Life\czero\addons\my_plugin.sma" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set PLUGIN_SOURCE_CODE_FILE_PATH=""E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma"" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem "E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting" is the path of the folder where the plugin source code is

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Example F:\SteamCMD\steamapps\common\Half-Life\czero\addons

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set SOURCE_CODE_INCLUDE_FOLDER="E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting"\include 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Example: $2="my_plugin" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set PLUGIN_BASE_FILE_NAME=layer 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set PLUGIN_BINARY_FILE_PATH=E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins\layer.amxx 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>IF layer == "" echo You must to save the plugin before to compile it.   & goto end 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Delete the old binary in case some crazy problem on the compiler, or in the system while copy it

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Sothis way there is not way you are going to use the wrong version of the plugin without knowing it

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>IF EXIST "E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins\layer.amxx" del "E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins\layer.amxx" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem To call the compiler to compile the plugin to the output folder $PLUGIN_BINARY_FILE_PATH 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>"E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\amxxpc.exe" -i""E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting"\include/" -o"E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins\layer.amxx" ""E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma"" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem If there was a compilation errorthere is nothing more to be done

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>IF NOT EXIST "E:\Program Files\HLDS\cstrike\addons\amxmodx\plugins\layer.amxx" goto end 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Calculating the duration is easy

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>for /"tokens=1-4 delims=:.," %a in ("20:41:36.86") do (set /"end=(((%a*60)+1%b % 100)*60+1%c % 100)*100+1%d % 100" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>(set /"end=(((20*60)+141 % 100)*60+136 % 100)*100+186 % 100" 

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Get elapsed time

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set /A elapsed=end-start 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Show elapsed time

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>set /A hh=elapsed/(60*60*100), rest=elapsed%(60*60*100), mm=rest/(60*100), rest%=60*100ss=rest/100cc=rest%100 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>if 0 LSS 10 set mm=00 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>if 0 LSS 10 set ss=00 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>if 5 LSS 10 set cc=05 

E
:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Outputting

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo.


E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo Took 0:00:00,05 seconds to run this script
Took 0:00:00,05 seconds to run this script.

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>rem Pause the script for result readingwhen it is run without any command line parameters

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>echo.

Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma""=="" was unexpected at this time.

E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting>if ""E:\Program Files\HLDS\cstrike\addons\amxmodx\scripting\layer.sma""=="" pause 
__________________
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-15-2017 , 14:02   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #55

Just switched to a folder without spaces in it's name, and it seems to work now.. thanks
__________________
Depresie is offline
Old 06-15-2017, 14:02
Depresie
This message has been deleted by Depresie. Reason: fml
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-15-2017 , 14:03   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #56

Quote:
Originally Posted by Depresie View Post
Happens every time with every plugin =\
Thanks for the log. Looking into it, seems a problem of too much double quotes. Can you find these lines:
Code:
File: AmxxPawn.bat
...
65: set PLUGIN_SOURCE_CODE_FILE_PATH="%1"
...
175: echo.
176: if "%1"=="" pause
And replace by:
Code:
File: AmxxPawn.bat
...
65: set PLUGIN_SOURCE_CODE_FILE_PATH=%1
...
175: echo.
176: if %PLUGIN_SOURCE_CODE_FILE_PATH%=="" pause
If it works, you can disable debug mode. If not, post the new log.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-15-2017 , 14:10   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #57

The problem was the folder's name, can not perform a test now since i changed the file locations and paths
__________________
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-31-2017 , 14:41   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #58

I don't know what you changed, but i have the same problem i had before, even tho the folder names dont have any spaces..

I also get an error about package files...

Spoiler
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 08-31-2017 , 19:34   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #59

I did some changes on the current version available which should fix the old problem. You can try download it configure it again.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-02-2017 , 06:15   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #60

Problem still the same
Code:
Compiling test... Current time is: 13:14:45.04 - Sat
Took 0:00:00,02 seconds to run this script.
and still the same
Code:
Package Control Messages
========================

Project Specific Syntax Settings
--------------------------------

  Project Specific Syntax Settings
  ================================
  
  This package allows syntax settings to be specified per project.
  
  In your `.sublime-project` file, you just need to add a `syntax_override` section, like so.
  
  ```json
  {
      ...
  
      "syntax_override": {
          "\\.html$": ["HTML Underscore Syntax", "HTML (Underscore)"]
      }
  }
  ```
  
  The `syntax_override` section can contain as many key/value pairs as you like.
  
  The easiest way to construct these key/value pairs is to open an existing file in your project, set the syntax you would like to use for that file with the `View > Syntax > ...` menus (or the command palette), right click in the file editor area, and select the `Project Specific Syntax > Copy syntax setting to clipboard` menu item. This menu item is also available via the command palette. Once copied to the clipboard, simply open your project file and paste the new key/value pair into the `syntax_override` section. Be sure to add any necessary commas to separate multiple key/value pairs so your project file is still valid JSON.
  
  If you need more control, you can construct your own key/value pairs. The key should be a regular expression that will be matched against the name of the file. Note that the `.` in `.html` has to be escaped to `\.` since it will match any character otherwise. And since this is a JSON string, we need to escape the slash, so we end up with `\\.`.
  
  The value in the key/value pair should be an array containing two or more strings. All but the last string in this array are the names of the package directories containing the syntax file and the last is the name of the syntax. Root around in Sublime Text's directory structure to find files that end with `.tmLanguage`. The names of these files (minus the `.tmLanguage` extension) are what you would use for the last string. Typically, you will only have two strings, a directory name and the syntax file name (minus `.tmLanguage` file extension), but this is dependent on the package's directory structure.
__________________
Depresie is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode