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

Variables in item count do not work anymore #3187

Closed
ghost opened this issue Jul 22, 2020 · 5 comments
Closed

Variables in item count do not work anymore #3187

ghost opened this issue Jul 22, 2020 · 5 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: high Issues with potentially high impact that could be harmful to users.

Comments

@ghost
Copy link

ghost commented Jul 22, 2020

Description

Variables in item count do not work anymore

Steps to Reproduce

set slot 0 of player to {_count} of {_item}

it works if it isn't variables, but if both count and item is variable... nope

Expected Behavior

I expect it to work, it worked before alpha6.

Errors / Screenshots

a slot can't be set to entity {_item}'s {_count}attribute because the latter is neither an item type nor an item stack

Server Information

  • Server version/platform: 1.12.2 paper
  • Skript version: 2.5 alpha6(rev1)

Additional Context

None

@APickledWalrus
Copy link
Member

For the main issue, Skript thinks you are using the expression %attributetypes% of %entities%. This can be fixed by just changing the syntax, so we’ll most likely need to do that.

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: high Issues with potentially high impact that could be harmful to users. labels Jul 22, 2020
@Whimsyturtle Whimsyturtle self-assigned this Jul 22, 2020
@Whimsyturtle Whimsyturtle removed their assignment Jul 22, 2020
@Whimsyturtle Whimsyturtle added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jul 22, 2020
@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jul 23, 2020

just got an error in another code that may be related:
remove {_count} of snowballs from victim's inventory

[10:39:24 ERROR]: [Skript] Use 'attacker' and/or 'victim' in damage events (Paintball.sk, line 683: remove {_count} of snowballs from victim's inventory')

Post full code? @Govindass

Make sure you're only using victim in damage events.

Test this code on current 2.5-alpha-6 avoiding this bug and didn't get the victim error.

on damage:
	set {_count} to 5
	remove "{_count} of snowballs" parsed as itemtype from victim's inventory

@Whimsyturtle
Copy link
Member

just got an error in another code that may be related:
remove {_count} of snowballs from victim's inventory
[10:39:24 ERROR]: [Skript] Use 'attacker' and/or 'victim' in damage events (Paintball.sk, line 683: remove {_count} of snowballs from victim's inventory')

Post full code? @Govindass

Make sure you're only using victim in damage events.

Test this code on current 2.5-alpha-6 avoiding this bug and didn't get the victim error.

on damage:
	set {_count} to 5
	remove "{_count} of snowballs" parsed as itemtype from victim's inventory

This happens when you do {_x} of {_y}

@ShaneBeee ShaneBeee removed the completed The issue has been fully resolved and the change will be in the next Skript update. label Aug 1, 2020
@ShaneBeee
Copy link
Contributor

Im removing the completed label, as this has not been fixed and still throws an error.

@ShaneBeee ShaneBeee added the completed The issue has been fully resolved and the change will be in the next Skript update. label Aug 1, 2020
@ShaneBeee
Copy link
Contributor

Sorry my mistake, it has been fixed, the error was from a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: high Issues with potentially high impact that could be harmful to users.
Projects
None yet
Development

No branches or pull requests

4 participants