Pottus / Texture-Studio

86 stars 90 forks source link

YSI 3 to YSI 4 #7

Open Crayder opened 9 years ago

Crayder commented 9 years ago

All I did was update the streamer include and plugin, when I hit compile and wait about 5 minutes (because the total compile time is like 13 minutes on my computer) I get the following errors and warnings:

tstudio\gui\guihook.pwn(9) : error 004: function "OnPlayerClickPlayerTD" is not implemented
tstudio\groups.pwn(102) : warning 200: symbol "@yH_OnPlayerSelectDynamicObject" is truncated to 31 characters
tstudio\groups.pwn(102) : warning 200: symbol "@yH_OnPlayerSelectDynamicObject" is truncated to 31 characters
tstudio\vehicles.pwn(45) : error 021: symbol already defined: "VehicleNames"
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(670) : warning 200: symbol "@yH_OnPlayerEditDynamicObject@0" is truncated to 31 characters
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(670) : warning 200: symbol "@yH_OnPlayerEditDynamicObject@0" is truncated to 31 characters
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(816) : warning 200: symbol "@yH_OnPlayerClickPlayerTextDraw" is truncated to 31 characters
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(816) : warning 200: symbol "@yH_OnPlayerClickPlayerTextDraw" is truncated to 31 characters
Crayder commented 9 years ago

I think the truncated names can be fixed using DEFINE_HOOK_REPLACEMENT.

DEFINE_HOOK_REPLACEMENT(Select, Sel);
DEFINE_HOOK_REPLACEMENT(Dynamic, Dyn);
DEFINE_HOOK_REPLACEMENT(TextDraw, TD);
DEFINE_HOOK_REPLACEMENT(Object, Obj);
DEFINE_HOOK_REPLACEMENT(OnPlayer, OP_);
Crayder commented 9 years ago

Well, YSI has the Dyn, TD, and Obj built in so don't add those. Either way, it's still not working.

@Misiur: I've put "DEFINE_HOOKREPLACEMENT(OnPlayer, OP);" and "DEFINE_HOOK_REPLACEMENT(Select, Sel);" along with the ones you have already defined (in the latest version of YSI, as added here https://github.com/Misiur/YSI-Includes/commit/3ba984cc10cca78df02fcfd53b697016ba50ef0c). Yet I still receive the same warning from above. Also, when I added the following:

DEFINE_HOOK_REPLACEMENT(Dynamic, Dyn);
DEFINE_HOOK_REPLACEMENT(TextDraw, TD);
DEFINE_HOOK_REPLACEMENT(Object, Obj);

I got the following errors:

F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(246) : error 021: symbol already defined: "@_yHDynamic"
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(247) : error 021: symbol already defined: "@_yHTextDraw"
F:\SA-MP Servers\Texture Studio\filterscripts\tstudio.pwn(248) : error 021: symbol already defined: "@_yHObject"

Maybe y_hooks isn't defining them correctly? Or are they meant to be like that?

Pottus commented 9 years ago

There is an issue with the new version of the streamer plugin and YSI which causes hooking of streamer callbacks to fail in YSI this is why I never bothered updating but I think there is only one or two hooked callbacks that could be changed to a "public" declaration instead of "hook", I am not against updating just need to make sure the changes work thanks.

Crayder commented 9 years ago

I don't understand why the hook replacements aren't working... It's not streamer. It's something to do with the new hook replacement method. Y-Less's worked, but since Misiur updated it (using new code from Y-Less) it doesn't seem to be.

Pottus commented 9 years ago

As I mentioned I had troubles with the streamer hooking it actually happened when SA-MP gdk was introduced.

Crayder commented 9 years ago

@Misiur and @samp-incognito: Is this a YSI 4 problem, or is it a streamer problem...?

Crayder commented 9 years ago

I managed to successfully compile. I just renamed some of the hooks and it worked. For example:

Hook in tsmain for OnPlayerClickPlayerTextDraw -> hook OP_ClickPlayerTextDraw. Hook in tsmain for OnPlayerEditDynamicObject -> hook OP_EditDynObj. Hook in groups for OnPlayerSelectDynamicObject -> hook OP_SelectDynObj. Hook in groups for OnPlayerDisconnect -> hook OP_Disconnect.

Also, for line 9 in guihooks. Instead of TD change it to TextDraw.

EDIT: Forgot to mention, for these 'OP_' names to work add the following line under #include <YSI\y_hooks>: DEFINE_HOOK_REPLACEMENT(OnPlayer, OP_);

EDIT: Notice, this causes a lot of weird shit to happen. Some:

  1. A YSI hook fatal error, something about MakePublicPointer.
  2. A long list of runtime errors.
  3. Very slow textdraw responses in game (but, they do seem to work after waiting).
Pottus commented 9 years ago

I will give you access to update the repository I don't have much interest in SA-MP anymore I am sick of wasting my time with it when there are other things I need to be doing in life.

Crayder commented 9 years ago

Ok then, good luck I guess... :/

Pottus commented 9 years ago

It is not an easy decision for me but I honestly made it one second because it is the best thing to do for myself right now.

ghost commented 8 years ago

I have the same problem like now, the problem is fixed ? Regards.

Crayder commented 8 years ago

I've deemed it impossible, on our side at least. It has to be fixed within YSI.

See https://github.com/Misiur/YSI-Includes/issues/33 for more information.