SkBee icon indicating copy to clipboard operation
SkBee copied to clipboard

[BUG] Stop current task, does not stop the current task

Open ForgenDT opened this issue 1 year ago • 2 comments

What happened?

Bonjour, The tasks continue to work even though I use "stop current task".

Steps to reproduce

  1. create a task
  2. call the task
  3. do the checks
  4. if the task should no longer exist, we stop it.

Expected behavior

function entity_task(ent_uuid: text, timespan: integer):
	set {_speed} to "%{_timespan}% seconds" parsed as timespan
	run {_speed} later repeating every {_speed}:
		# broadcast "_timespan: %{_timespan}%"
		if {db_entity::%{_e_uuid}%::*} is not set:
			broadcast "&6Entity %{_e_uuid}% not exist. %now%"
			stop current task
		else:
			if chunk at {db_entity::%{_e_uuid}%::location} is not loaded:
				broadcast "&6Entity not loaded. %now%"
				stop current task
			else:
				broadcast "Task work"

in my case, the task executes every 30 seconds, and when I delete the entity, (broadcast "&6Entity %{_e_uuid}% not exist. %now%") is executed every 30 seconds as if (stop current task) was not working...

It doesn't do it all the time, sometimes it works, but sometimes it doesn't.

SkBee Version

3.3.0

Server Version

Paper 1.20.4

SkBee Info

--- [SkBee Loading Info] ---

  • [NBTAPI] Found Spigot: v1_20_R3! Trying to find NMS support
  • [NBTAPI] NMS support 'MC1_20_R3' loaded!
  • NBT Elements successfully loaded
  • Text Component Elements successfully loaded
  • Advancement Elements successfully loaded
  • BossBar Elements successfully loaded
  • Bound Elements successfully loaded
  • Damage Source elements successfully loaded
  • Display Entity elements successfully loaded
  • Fishing elements successfully loaded
  • Game Event Elements successfully loaded
  • Particle Elements successfully loaded
  • RayTrace elements successfully loaded
  • Recipe Elements successfully loaded
  • Scoreboard Elements successfully loaded
  • Scoreboard Objective Elements successfully loaded
  • Statistic Elements successfully loaded
  • Structure Elements successfully loaded
  • Minecraft Tag elements successfully loaded
  • Team Elements successfully loaded
  • Tick Manager elements successfully loaded
  • Villager Elements successfully loaded
  • Virtual Furnace Elements disabled via config
  • World Border Elements successfully loaded
  • World Creator Elements successfully loaded
  • Plugin is up to date! --- [Server Info] --- Server Version: git-Paper-436 (MC: 1.20.4) Skript Version: 2.8.3 Skript Addons:
  • skript-gui v1.3
  • skript-reflect v2.4
  • skRayFall v1.9.28
  • SkJson v3.0.3 SkBee Version: 3.3.0

Additional Information

No response

ForgenDT avatar Mar 19 '24 15:03 ForgenDT