ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Ghostwheelai Shortcuts simple test required (https://www.esoui.com/forums/showthread.php?t=9322)

GhostwheelAI 08/04/20 04:00 AM

Ghostwheelai Shortcuts simple test required
 
Hi.

I made a simple addon. And plan to keep developing it. One of the functions is to jump to primary house. I tried to keep the code as simple as possible, so this function doesn't check for null.

I've just thought that maybe if player doesn't own any house it would get an exception and throw nil error in the ui. Can somebody who doesn't have a house check this please?

Baertram 08/04/20 04:54 AM

Sure, provide the function here so we can run it with /script funcName ingame
But I doubt it will return nil (if it's an API function). It might return 0 or false I guess.

GhostwheelAI 08/04/20 05:52 AM

Quote:

Originally Posted by Baertram (Post 42037)
Sure, provide the function here so we can run it with /script funcName ingame
But I doubt it will return nil (if it's an API function). It might return 0 or false I guess.

It's 2 API functions combined. I think it will fail.

Code:

RequestJumpToHouse(GetHousingPrimaryHouse())

Baertram 08/04/20 04:25 PM

d(GetHousingPrimaryHouse()) returns 0 if you do not own any house and
RequestJumpToHouse(0) does nothing.
So no error message as it seems.


All times are GMT -6. The time now is 09:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI