Skip to content

Commit

Permalink
Fix: Negating score data
Browse files Browse the repository at this point in the history
  • Loading branch information
outercloudstudio committed Sep 11, 2022
1 parent 2517473 commit e7c42f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Languages/Mcfunction/Validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,14 @@ export class CommandValidator {

for (const piece of pieces) {
const scoreName = piece.split('=')[0]
const scoreValue = piece.split('=').slice(1).join('=')
let scoreValue = piece.split('=').slice(1).join('=')

if (!scoreValue) return false

//Value is negated so remove negation
if (scoreValue.startsWith('!'))
scoreValue = scoreValue.substring(1, scoreValue.length)

let argumentType = await this.commandData.isArgumentType(
scoreValue,
{
Expand Down

0 comments on commit e7c42f7

Please sign in to comment.