Raised This Month: $32 Target: $400
 8% 

[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-18-2018 , 14:23   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #81

I checked the compiler script, and this seems to be a destructive action. On these lines:
Code:
105: :: Copy the include folder
106: :: https://stackoverflow.com/questions/...e-name-message
107: IF EXIST "%SOURCE_CODE_INCLUDE_FOLDER%" call echo d | xcopy /S /Y "%SOURCE_CODE_INCLUDE_FOLDER%" "%COMPILER_INCLUDE_FOLDER_PATH%" > nul
They are coping/overriding all the files from the first compiler include to the second compiler include folder.

When I first wrote this I had completely forgot to handle this case, i.e., when someone is compiling one plugin with multiple compilers.
  1. To fix this now you would have to restore the other compiler include files from a backup.
  2. And remove that whole line `IF EXIST ...` from all .bat scripts.
__________________
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-18-2018 , 15:19   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #82

Quote:
Originally Posted by CrazY. View Post
Auto-completion is not working.
I am getting the same problem with him.
Only way to fix it is to reset the program.
Anyone know how to fix this?
__________________
My plugin:

Last edited by Celena Luna; 07-18-2018 at 15:19.
Celena Luna is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-18-2018 , 15:32   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #83

Quote:
Originally Posted by addons_zz View Post
I checked the compiler script, and this seems to be a destructive action. On these lines:
Code:
105: :: Copy the include folder
106: :: https://stackoverflow.com/questions/...e-name-message
107: IF EXIST "%SOURCE_CODE_INCLUDE_FOLDER%" call echo d | xcopy /S /Y "%SOURCE_CODE_INCLUDE_FOLDER%" "%COMPILER_INCLUDE_FOLDER_PATH%" > nul
They are coping/overriding all the files from the first compiler include to the second compiler include folder.

When I first wrote this I had completely forgot to handle this case, i.e., when someone is compiling one plugin with multiple compilers.
  1. To fix this now you would have to restore the other compiler include files from a backup.
  2. And remove that whole line `IF EXIST ...` from all .bat scripts.
Oh, so that's why I had an "include" folder outside my server directory. I removed the "IF EXIST" lines from the scripts, but the same thing is still happening. Only this time I don't get a copy of the include folder. What do you mean by "restore the other include files from a backup"?

Quote:
Originally Posted by Celena Luna View Post
I am getting the same problem with him.
Only way to fix it is to reset the program.
Anyone know how to fix this?
Same here.

Also, .inc files don't use the AMXX syntax by default when opened.
__________________

Last edited by OciXCrom; 07-18-2018 at 15:32.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-18-2018 , 15:40   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #84

Quote:
Originally Posted by Celena Luna View Post
I am getting the same problem with him.
Only way to fix it is to reset the program.
I fixed this yesterday and released a new version with a fix for it. I think you are using an old version.

Can you check what version you are using?

Just go to the Sublime Text menu `Preferences -> Package Control` then Type `List` and press enter:

__________________
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-18-2018 , 15:57   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #85



I don't have that

Edit: Oh, I used the old version. Gonna install the new one new
__________________
My plugin:

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

Quote:
Originally Posted by OciXCrom View Post
What do you mean by "restore the other include files from a backup"?
I though your other compiler include folder was overwrite by that line.

I figured out why this error. When the script is calling the other compiler, it is passing the current folder compiler include folder as parameter, then it is shadowing the other compiler's includes with the current one.
Code:
File: .bat
121: :: To call the compiler to compile the plugin to the output folder $PLUGIN_BINARY_FILE_PATH
122: "%AMXX_COMPILER_PATH%" -i"%SOURCE_CODE_INCLUDE_FOLDER%/" -o"%PLUGIN_BINARY_FILE_PATH%" "%PLUGIN_SOURCE_CODE_FILE_PATH%"
Then, try to replace these lines on the diff: https://github.com/evandrocoan/AmxxEditor/commit/cbede59bd9a45d1ffe90f87e6cef8d90c2952907
This is computing the other's compiler include folder and adding it before the current compiler's include, then this should fix it.

Quote:
Originally Posted by OciXCrom View Post
Also, .inc files don't use the AMXX syntax by default when opened.
I am not sure why this is happening, as by default that should be working.

Anyways, you can force all files with `.inc` extension to open with the correct syntax:
  1. Opening a `.inc` file
  2. And going on the menu `View -> Syntax -> Open all with current extension as... -> Amxmodx -> AmxmodxPawn`

__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-18-2018 , 16:33   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #87

If it does not work, enable debug mode on your .bat script by changing the first line from `@echo off` `@echo on`, then post the output.
__________________
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-18-2018 , 17:16   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #88



I got this one while installing the Studio Channel
__________________
My plugin:
Celena Luna is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-18-2018 , 17:51   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #89

Usually it is normal, you just need to restart as the message says.

But without the Sublime Text console contents I cannot help.

After hitting the `OK` button, you should open the Sublime Text console
by going on the menu `View -> Show Console`, then copy its contents and post it here.
Then, I could try to figure out what happened.

Anyways, did you restarted Sublime Text?

If still there is some error, then, can you post here the new/current/actual contents of your Sublime Text console?
__________________
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-18-2018 at 20:33.
addons_zz is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-19-2018 , 05:24   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #90



1. The Amxmodx tab didn't appear.
2. It used to be F9 for build. Why it have to be Ctr+B now?
3. #include didn't hightlight
Attached Files
File Type: txt console.txt (300.8 KB, 93 views)
__________________
My plugin:

Last edited by Celena Luna; 07-19-2018 at 16:04.
Celena Luna is offline
Reply



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 13:52.


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