JazzJackrabbit Community Forums

JazzJackrabbit Community Forums (http://www.jazz2online.com/jcf/index.php)
-   JJ2+ Issue Tracker (http://www.jazz2online.com/jcf/forumdisplay.php?f=49)
-   -   Public Test Warn about incorrect function signatures (http://www.jazz2online.com/jcf/showthread.php?t=20723)

Violet CLM Sep 30, 2024 10:21 AM

Warn about incorrect function signatures
 
Download

This build shows warnings in the chatlog (if AngelscriptDebug is true in plus.ini) when you try to write a hook function in a script file but you get the function signature wrong. For example, void onMain() is great, but void onMain(jjPLAYER@) will show a warning.

Nonstandard function names will not show any warnings. For example, if you write void onLevelMain(), JJ2+ has no way to guess what you really meant to do.

This does modify (standardize) the code used for registering and calling almost every hook function, so it's possible that some of them broke in the process. When testing this build, please make sure that all hooks work when written correctly, not just that they show warnings when written incorrectly.

Spaz Electro Oct 1, 2024 04:56 AM

`bool onPlayerTimerEnd(jjPLAYER@ play)` doesnt trigger the warning or any signature of that function

Violet CLM Oct 9, 2024 02:53 PM

Okay, I added support for onReceive, onPlayerTimerEnd, and onGetPublicInterface. They're all handled a bit differently internally, but I suppose the user shouldn't need to care about that. Same download URL as before.


All times are GMT -8. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online