-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnFilterScriptInit not initializing properly #241
Comments
Note: an user was able to run this filterscript without sampctl — view response. This is my folder structure and both
|
Thanks for the detailed report! Can you check for me what the contents of |
Glad to help!
It does not change after |
So Now that you've ensured and you have a generated cfg file, run the samp server executable manually and check the output. Also it might be worth creating a simpler filterscript, to rule out any of the dependencies from the issue. |
Then, I commented out a few parts of my code: #include <a_samp>
/*#include <a_mysql>
#include <streamer>
#include <sscanf2>
#include <Pawn.CMD>
#define HOST "localhost"
#define USER "root"
#define PASSWORD "password"
#define DATABASE "streets"
new MySQL:cursor;
enum E_PLAYER_DATA {
bool:CREATING = false
}
enum E_STREET_DATA {
ID,
NAME[25],
Float:POINTS[2] // xn, yn
}
*/
public OnFilterScriptInit() {
print("Initializing samp-streets.");
/*cursor = mysql_connect(HOST, USER, PASSWORD, DATABASE);
print("Initializing samp-streets.");
if(mysql_errno(cursor) != 0) {
printf("samp-streets: Couldn't establish connection to \'%s\'.\nReason: %d | Reference: https://bit.ly/2nU9uiB", DATABASE, mysql_errno(cursor));
return SendRconCommand("unloadfs samp-streets");
} else {
printf("samp-streets: Connection to \'%s\' was established.", DATABASE);
}*/
return 1;
}
public OnFilterScriptExit() {
return 1;
} I also changed the filterscript's
This does output |
Looks like it's a problem with loading plugins. |
Could you be using different include versions when compiling manually vs with sampctl? Maybe there's something that changed in one and so the wrong version is used and doesn't chain. |
Hey @Y-Less. I always compiled with |
Can you test this on .31? |
I can't seem to update to the newest version ( |
.31 is releasing now, the build broke for some reason so I just restarted it and it worked! |
Updated to |
Interesting, so it's not related to the changes to plugin order at all. It's strange that unit tests didn't catch this regression, MySQL is even part of some tests and it's also tested here: https://github.com/sampctl/plugin-build-tests This one may require some more time to figure out what's different on your end so it can be covered in tests. |
This could be an issue on my end. Have you tried to replicate the issue yourself? |
No, I successfully generated a server.cfg with the MySQL plugin with The latest release includes a ton of new |
Well, this is new. PS C:\Users\CARLOS MENEZES\Desktop\samp-streets\filterscripts\street-maker> sampctl p build
ERROR: failed to interpret directory as Pawn package: failed to read package definition: open C:\Users\CARLOS MENEZES\Desktop\samp-streets\filterscripts\street-maker\.env: The system cannot find the file specified.``` |
#243 solved that |
Did the build break again?
|
No it just takes a while: https://github.com/Southclaws/sampctl/releases/tag/1.8.33 |
Only just managed to get the latest version. Can confirm the issue persists. |
Can you run the command with |
Command:
|
Ah, right everything is running find, it just took a while to nail the issue. Until #138 is implemented, sampctl has no knowledge of the package that exists at The odd thing about this is that no missing native errors were raised. Maybe these don't apply to filterscripts. |
What do you mean with adding the dependencies manually? |
Copy the dependencies of the filterscript's pawn.json to the server's pawn.json |
That seems to have fixed things. Cheers. |
I've created a filterscript that's loading properly. However, I want a message to print upon the initialization of said filterscript:
The filterscript loads fine:
But it does not print the first message in the first
print
statement. This is the entire code, for reference:I did check this thread from Marcel: http://forum.sa-mp.com/showthread.php?t=602193 — no helpful answer was given.
The text was updated successfully, but these errors were encountered: