SA-MP Forums Archive
[HELP] Loading plugin into server? (another questions aswell ) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: [HELP] Loading plugin into server? (another questions aswell ) (/showthread.php?tid=140797)



[HELP] Loading plugin into server? (another questions aswell ) - DarrenReeder - 10.04.2010

Hello,

My main question is how/why wont my plugin for mysql load onto the server? I know how to script mysql very well, however this is first time i have put mysql in from scratch and the plugin keeps failing when loading the server up (this results in saying that Script.amx cannot find file or functions)...

this is the error:

Code:
[16:17:29] Server Plugins
[16:17:29] --------------
[16:17:29] Loading plugin: mysql
[16:17:29]  Failed.
[16:17:29] Loaded 0 plugins.
In my 'plugins' folder it has 'mysql.dll'..this is my server.cfg:

Code:
plugins mysql
-Thanks

_________________________________________________

P.S. my other lil question is about making plugins. I have experience in Java, although i need to know C. Is it hard to move over from java to C? i am pretty good in Java although not amazing.


Re: [HELP] Loading plugin into server? (another questions aswell ) - FUNExtreme - 10.04.2010

If you have linux running use mysql.so instaid of mysql.dll


Re: [HELP] Loading plugin into server? (another questions aswell ) - ziomal432 - 11.04.2010

Do you have libmysql.dll?


Re: [HELP] Loading plugin into server? (another questions aswell ) - DarrenReeder - 11.04.2010

Yea, im using windows..

and yea i got libmysql..

_________________________________________________

Im using a different mysql plugin now and its working perfectly, thanks for replys..

_________________________________________________

Anyone can help me with my other problem?


Re: [HELP] Loading plugin into server? (another questions aswell ) - m0niSx - 12.04.2010

i got this problem a time ago
it says "Plugin Architacture wrong" or something like that in the 0.2X samp
try to see other plugins code maybe in your main


Re: [HELP] Loading plugin into server? (another questions aswell ) - DarrenReeder - 03.05.2010

Quote:
Originally Posted by m0niSx
i got this problem a time ago
it says "Plugin Architacture wrong" or something like that in the 0.2X samp
try to see other plugins code maybe in your main
so how do i fix it?


Re: [HELP] Loading plugin into server? (another questions aswell ) - Toribio - 03.05.2010

Usually (I think always) this error happens when the samp-server.exe cannot find the "exports" functions.

So, check if the file yourplugin.def is being loaded by your plugin on VC++ config.

If it's loaded, and the error continues, try to see if all functions wich samp-server.exe calls are in your plugin and in the .def file.

Code:
EXPORTS
	Supports
	Load
	Unload
	AmxLoad
	AmxUnload
Those are the functions wich samp-server.exe calls.

And the .vcproj config: ModuleDefinitionFile="yourplugin.def"


Re: [HELP] Loading plugin into server? (another questions aswell ) - DarrenReeder - 03.05.2010

Quote:
Originally Posted by Toribio
Usually (I think always) this error happens when the samp-server.exe cannot find the "exports" functions.

So, check if the file yourplugin.def is being loaded by your plugin on VC++ config.

If it's loaded, and the error continues, try to see if all functions wich samp-server.exe calls are in your plugin and in the .def file.

Code:
EXPORTS
	Supports
	Load
	Unload
	AmxLoad
	AmxUnload
Those are the functions wich samp-server.exe calls.

And the .vcproj config: ModuleDefinitionFile="yourplugin.def"
this looks like this might be the problem but im not sure what most of it means, lol...

what file is yourplugin.def ?? (my plugin name is mysql.dll) and i am not sure how i check what the samp-server.exe is calling...


Re: [HELP] Loading plugin into server? (another questions aswell ) - Toribio - 03.05.2010

Your plugin folder must have the file mysql.def.

Check if it exists, if not, create it with this content:

Code:
LIBRARY "mysql"
EXPORTS
	Supports
	Load
	Unload
	AmxLoad
	AmxUnload
And then open your project file, and go to Project->mysql Properties (or Alt+F7), then:

Configuration properties
-Liker
--Module Definition File

Set it to mysql.def.

You're done.

PS: If you're not coding this plugin, you have to contact the plugin's owner, because this is a internal problem.