Jump to content
  • 0
Sign in to follow this  
Shikazu

HPM script command - Cant get it to work q.q

Question

Hey

 

I have some issues in getting stuff to work, because i want to write mit source edits as HPM Plugins so i dont have to edit everything if there was an update :)

 

i've tried to add a new command called dispbottomcolor and i have some issues :o

 

Here is the plugin: http://upaste.me/7b816044b90bc54e

 

And this is my error.log from VC++ 2010 Express

 

 

1>------ Neues Erstellen gestartet: Projekt: plugin-sample, Konfiguration: Debug Win32 ------1>  dispbottomcolor.c1>..srcpluginsdispbottomcolor.c(16): warning C4013: 'script_rid2sd' undefiniert; Annahme: extern mit Rückgabetyp int1>..srcpluginsdispbottomcolor.c(16): warning C4047: 'Initialisierung': Anzahl der Dereferenzierungen bei 'TBL_PC *' und 'int' unterschiedlich1>	 Bibliothek "plugin-sampleDebugplugin-sample.lib" und Objekt "plugin-sampleDebugplugin-sample.exp" werden erstellt.1>dispbottomcolor.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_script_rid2sd" in Funktion "_buildin_dispbottomcolor".1>..pluginsplugin-sample.dll : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ==========
 

The problem is that script_rid2sd is not defined, so i want to script.c, copied the function header to script.h and tried to build and he was not able to compile it.

 

I think the issue might be that i don't have access to every function in script.c because the function header's / function prototypes are not mentioned in the script.h.

 

What are your suggestions, because i want to use HPM to be able to update my version to the newest without much custom stuff to be reedited every time and this would be causing more src edits like i have by now..

 

Thanks for your help! :)

 

~Shikazu

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

the script_rid2sd not being in the script.h header should be considered a bug I think, the TBL_PC * error is being caused because of script_rid2sd and will be gone once its in the header, i'll be getting this fixed in a upcoming commit, in the meantime you can put

TBL_PC *script_rid2sd(struct script_state *st)
in the script.h header to make your plug-in compileable,

btw your plugin will still crash because your code is trying to access the clif interface without linking it, to link it on plugin_init you have to:

clif = GET_SYMBOL("clif");

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.