SA-MP Forums Archive
y_hook and Pawn Issues (Linux Version) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: y_hook and Pawn Issues (Linux Version) (/showthread.php?tid=609452)



y_hook and Pawn Issues (Linux Version) - DesertFoxNight - 12.06.2016

I have downloaded the Linux version of the Pawn compiler from Zeex repository and everything seems to work except for y_hooks. When I include y_hooks, I received various include errors which I've fixed for the most part by replacing the backslash \ to a forward slash / in each file. The final error that I get is this one which I'm unsure how to fix:
Код:
owner@owner-server:~/Games/samp$ ./pawnc-3.10/pawncc -ipawnc-3.10/include gamemodes/valkyrie_cnr.pwn -';+' -'\\' -'(+'
Pawn compiler 3.10.20150531                     Copyright © 1997-2006, ITB CompuPhase

pawnc-3.10/include/YSI/internal/../y_scriptinit.inc(62) : fatal error 100: cannot read from file: "a_samp"

Compilation aborted.

1 Error.
a_samp.inc does exist in my include folder and my gamemode includes this file as well, so I'm not sure what the problem could be. Also, when I don't include y_hooks my gamemode compiles without any errors. I would greatly appreciate any help you can give me in resolving this problem. Thank you for your time.

Here's information about my Linux distribution:
Код:
owner@owner-server:~/Games/samp$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

owner@owner-server:~/Games/samp$ uname -a
Linux owner-server 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux



Re: y_hook and Pawn Issues (Linux Version) - lolumadd_ - 12.06.2016

Can you try including y_hooks at different positions in your code? Try putting it before any other includes, then try putting it after all other includes. Let's see if you get different results.


Re: y_hook and Pawn Issues (Linux Version) - DesertFoxNight - 12.06.2016

Yes, I have tried including y_hooks at different points to no avail. Here is what I have tried:
Код:
//==== Configuration 1 ====
#include <a_samp>
#include <string>
#include <sscanf2>
#include <foreach>
#include <a_mysql>
#include <streamer>
#include <YSI/y_hooks>

#include "includes/declarations.inc"
#include "includes/locations.inc"
#include "includes/common_functions.inc"
#include "includes/timers.inc"
#include "includes/commands.inc"
#include "includes/database.inc"

// ==== Configuration 2 ====
#include <a_samp>
#include <YSI/y_hooks>
#include <string>
#include <sscanf2>
#include <foreach>
#include <a_mysql>
#include <streamer>

#include "includes/declarations.inc"
#include "includes/locations.inc"
#include "includes/common_functions.inc"
#include "includes/timers.inc"
#include "includes/commands.inc"
#include "includes/database.inc"

// ==== Configuration 3 ====
#include <YSI/y_hooks>
#include <a_samp>
#include <string>
#include <sscanf2>
#include <foreach>
#include <a_mysql>
#include <streamer>

#include "includes/declarations.inc"
#include "includes/locations.inc"
#include "includes/common_functions.inc"
#include "includes/timers.inc"
#include "includes/commands.inc"
#include "includes/database.inc"



Re: y_hook and Pawn Issues (Linux Version) - DesertFoxNight - 13.06.2016

I finally resolved the issue with y_hooks by downloading YSI 4.0 from Zeex's Github repository, and then going through each file modifying the file path by replacing the backslashes to forward slashes in each #include directive. For example:
Код:
// Original Includes for Windows
#include "..\YSI_Internal\y_unique"
#include "..\YSI_Core\y_cell"
#include "..\YSI_Core\y_utils"
#include "..\YSI_Storage\y_amx"
#include "..\YSI_Core\y_als"
#include "..\YSI_Internal\y_cgen"
#include "..\amx\asm"

// Modified file paths for Linux
#include "../YSI_Internal/y_unique"
#include "../YSI_Core/y_cell"
#include "../YSI_Core/y_utils"
#include "../YSI_Storage/y_amx"
#include "../YSI_Core/y_als"
#include "../YSI_Internal/y_cgen"
#include "../amx/asm"
As to now everything seems to work as expected, but I'll report back if I encounter any more errors.