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

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-19-2018 , 16:19   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #91

Quote:
Originally Posted by Celena Luna View Post
This is a usual/normal message. Sometimes when Sublime Text Package Control installs or updates something,
it needs to restart Sublime Text to finish the installation/update.

Quote:
Originally Posted by Celena Luna View Post
1. The Amxmodx tap didn't appear.
I did not added that menu to be show when install the StudioChannel because it's goal
is to be a universal programming environment for all programming languages.

Therefore, adding a exclusive menu on the main Sublime Text interface for every language out there
would not be nice. Anyways, you can always customize Sublime Sublime text.

I just added a command to create the menu. But it will only be available when
the version `3.0.0` of the package is released. I will release it soon as the
following pull request gets merged:
  1. https://github.com/wbond/package_control_channel/pull/7193 Renamed Amxmodx package to AmxxEditor

After that, you will be able to access the command on:

`Prefences -> Package Settings -> AmxxEditor -> Install AmxxEditor Menu`



But as you are using the `StudioChannel`, you can install the version 3.0.0 just by uninstalling the package `AmxxEditor` and installing it again. Then you will be able to use that command to create the menu.

But first, delete your Package Control Cache because I did the updates on this afternoon,
then it is probably out of date. To delete the cache you just need to open your `User` folder
and delete the folder `Package Control.cache` directory.

To open the your User folder, just to go the Sublime Text menu `Preferences -> Browse Packages...` Then you can find the `User` directory there.

To uninstall the `AmxxEditor` package just press `Ctrl+Shift+P` and type `Remove Package`, and press Enter,
then you type the name `AmxxEditor` and press enter.

Then to install the package again, just do the same steps, but use `Install Package` instead of `Remove Package`


Quote:
Originally Posted by Celena Luna View Post
2. It used to be F9 for build. Why it have to be Ctr+B now?
Because F9 was not the standard way of building with Sublime Text, but `F7` or `Ctrl+B`
or `Ctrl+Shift+B` (if you want to change the building script).

You can create a setting on your user keybindings to use F9 key if you like.
  1. Just go to the Sublime Text menu `Preferences -> Key Bindings`
  2. Then add the following key bind:
    Code:
    [
        { "keys": ["f9"], "command": "build" },
    ]

Quote:
Originally Posted by Celena Luna View Post
3. #include didn't hightlight
  1. Can you close your Sublime Text,
  2. And open it again,
  3. And open the Sublime Text console, and wait until all packages finished loading
  4. Then post here the console contents?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-19-2018 , 17:20   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #92

Deleted and fully re-installed.
Color: twlight



1. #define didn't hightlighted
2. #include didn't hightlighted
3. #define CSW_BASE CSW_AK47. The number 7 is highlighted somehow (same case with #define CSW_BASE CSW_M4A1. The number 1 is hightlighted)
4. I want to ask how to make the plugins compiled at the same folder as it source?

Spoiler


Sorry for asking too much. I got used to with the old version so it is little complicated for me to switch to the new version
__________________
My plugin:

Last edited by Celena Luna; 07-19-2018 at 17:25.
Celena Luna is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-19-2018 , 19:16   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #93

Quote:
Originally Posted by Celena Luna View Post
1. #define didn't hightlighted
2. #include didn't hightlighted
It is because by default I set to use my version of the Amxx Syntax. It available by my other package called `AmxxPawn`.

If you prefer the old one, you can just set to use the standard syntax.
You can override this for all files with `.sma` extension to open with the old syntax:
  1. Opening a `.sma` file
  2. And going on the menu `View -> Syntax -> Open all with current extension as... -> AmxxEditor -> AmxxEditorPawn`


Quote:
Originally Posted by Celena Luna View Post
3. #define CSW_BASE CSW_AK47. The number 7 is highlighted somehow (same case with #define CSW_BASE CSW_M4A1. The number 1 is hightlighted)
I just fixed this anomaly, Package Control should update your `AmxxPawn` package soon.

Quote:
Originally Posted by Celena Luna View Post
4. I want to ask how to make the plugins compiled at the same folder as it source?
You can just edit the `AmxxEditor.bat` script file and change the line 83:
Code:
File: User/AmxxEditor/AmxxEditor.bat
83: set PLUGIN_BINARY_FILE_PATH=%folders_list[0]%\%PLUGIN_BASE_FILE_NAME%.amxx
-->
Code:
83: set PLUGIN_BINARY_FILE_PATH=%4\%PLUGIN_BASE_FILE_NAME%.amxx
Quote:
Originally Posted by Celena Luna View Post
Sorry for asking too much. I got used to with the old version so it is little complicated for me to switch to the new version
No problem. I am just happy someone is actually using it. Beyond myself, you are the first one I know who installed the `StudioChannel`.
__________________
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; 07-20-2018 at 12:33.
addons_zz is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-20-2018 , 03:31   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #94

Almost all my problem is solved except the #4 one

Quote:
Originally Posted by addons_zz View Post
You can just edit the `AmxxEditor.bat` script file and change the line 83:
Code:
File: User/AmxxEditor/AmxxEditor.bat
79: 
80: :: Example: $2="my_plugin"
81: set PLUGIN_BASE_FILE_NAME=%2
82: set PLUGIN_BASE_FILE_NAME=%PLUGIN_BASE_FILE_NAME:"=%
83: set PLUGIN_BINARY_FILE_PATH=%folders_list[0]%\%PLUGIN_BASE_FILE_NAME%.amxx
-->
Code:
83: set PLUGIN_BINARY_FILE_PATH=%4\%PLUGIN_BASE_FILE_NAME%.amxx
It throw me this error


Log:
Spoiler


If I put this back, it work normally
Code:
83: set PLUGIN_BINARY_FILE_PATH=%folders_list[0]%\%PLUGIN_BASE_FILE_NAME%.amxx
__________________
My plugin:

Last edited by Celena Luna; 07-20-2018 at 03:32.
Celena Luna is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-20-2018 , 10:56   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #95

Or just press ctrl + shift + p, write "Set Syntax: AmxmodxPawn" and then Enter.I'm using this package instead of a sublime made specific for amxmodx editor, It's working fine.

https://packagecontrol.io/packages/AmxxPawn
__________________









Last edited by CrazY.; 07-20-2018 at 10:58.
CrazY. is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-20-2018 , 12:13   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #96

Quote:
Originally Posted by CrazY. View Post
Or just press ctrl + shift + p, write "Set Syntax: AmxmodxPawn" and then Enter.I'm using this package instead of a sublime made specific for amxmodx editor, It's working fine.

https://packagecontrol.io/packages/AmxxPawn
Syntax problem is fixed. This is about other problem
__________________
My plugin:
Celena Luna is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-20-2018 , 13:21   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #97

Quote:
Originally Posted by Celena Luna View Post
Almost all my problem is solved except the #4 one
Thanks for reporting back. I looked into the source code and the problem is that the script
was not handing paths with spaces correctly.

Now, I fixed it, but you will need to replace your entire script with the new one
and configure the compiler again. Here is the new version:
Spoiler


Now, you need to replace the new line 83 with this other thing:
Code:
File: Packages/User/AmxxEditor/AmxxEditor.bat
83: set "PLUGIN_BINARY_FILE_PATH=%folders_list[0]%\%PLUGIN_BASE_FILE_NAME%.amxx"
-->
Code:
83: set "PLUGIN_BINARY_FILE_PATH=%SOURCE_CODE_FOLDER%\%PLUGIN_BASE_FILE_NAME%.amxx"
__________________
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; 07-20-2018 at 13:23.
addons_zz is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-21-2018 , 23:58   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #98

I haven't test again yet but thanks for fast reply

Edit:
It work perfect now ^^
The compile console show some unnecessary info but it is editable in the configure the compiler so it is ok.
one of them is this one
Code:
:: Outputting
echo.
echo Took %hh%:%mm%:%ss%,%cc% seconds to run this script.
__________________
My plugin:

Last edited by Celena Luna; 07-22-2018 at 03:16.
Celena Luna is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-23-2018 , 08:25   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #99

There's a bug when writing on the same line after a "case":

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-23-2018 , 14:10   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #100

I fixed it. Package Control should update your package with it in a few hours.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz 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:55.


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