Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: hasLightSource returns ERROR instead of 0 #4885

Closed
Jmr3366 opened this issue Sep 1, 2024 · 1 comment · Fixed by #4887
Closed

[Bug]: hasLightSource returns ERROR instead of 0 #4885

Jmr3366 opened this issue Sep 1, 2024 · 1 comment · Fixed by #4887
Labels

Comments

@Jmr3366
Copy link
Contributor

Jmr3366 commented Sep 1, 2024

Describe the Bug

hasLightSource can return Unknown light type "*" in function "hasLightSource". when the result should be 0

To Reproduce

Set a light source to a known value, like D20 Candle-5
[r: hasLightSource("D20","Candle - 5")] returns 1
[r: hasLightSource("D20","none")] returns 0
[r: hasLightSource("none","Candle - 5")] returns Unknown light type "none" in function "hasLightSource".
[r: hasLightSource("*","Candle - 5")] returns 1
[r: hasLightSource("*","none")] returns Unknown light type "none" in function "hasLightSource".

Expected Behaviour

This should return 0 or 1 based off the values provided regardless of what exists in Lights.

If not possible, this error Unknown light type "none" in function "hasLightSource", _could fit_ if you do NOT use a *` (eg. set a "type" that does NOT exist).

Screenshots

No response

MapTool Info

1.15.0

Desktop

Win11

Additional Context

No response

@Jmr3366 Jmr3366 added the bug label Sep 1, 2024
@Jmr3366 Jmr3366 changed the title [Bug]: hasLightSource returns instead of 0 [Bug]: hasLightSource returns ERROR instead of 0 Sep 1, 2024
Jmr3366 added a commit to Jmr3366/maptool that referenced this issue Sep 2, 2024
@Jmr3366
Copy link
Contributor Author

Jmr3366 commented Oct 18, 2024

This one should be closed

@Jmr3366 Jmr3366 closed this as completed Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant