diff --git a/src/Binder/Binder.cpp b/src/Binder/Binder.cpp index 504073d..c770c5b 100644 --- a/src/Binder/Binder.cpp +++ b/src/Binder/Binder.cpp @@ -406,7 +406,7 @@ namespace Porygon::Binder { if (scope == -1) { this->_scriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::VariableNotFound, expression->GetStartPosition(), - expression->GetLength()); + expression->GetLength(), {key.GetDebugString()}); return new BoundBadExpression(expression->GetStartPosition(), expression->GetLength()); } auto var = this->_scope->GetVariable(scope, key); diff --git a/src/Diagnostics/ErrorMessages-EN-US.cpp b/src/Diagnostics/ErrorMessages-EN-US.cpp index 40b00ee..d550712 100644 --- a/src/Diagnostics/ErrorMessages-EN-US.cpp +++ b/src/Diagnostics/ErrorMessages-EN-US.cpp @@ -11,7 +11,7 @@ namespace Porygon::Diagnostics { {DiagnosticCode ::NoBinaryOperationFound, "No binary operation found for these operands and operator."}, {DiagnosticCode ::NoUnaryOperationFound, "No unary operation found for this operand and operator."}, {DiagnosticCode ::CantAssignVariable, "Something went wrong while assigning variable."}, - {DiagnosticCode ::VariableNotFound, "Variable not found."}, + {DiagnosticCode ::VariableNotFound, "Variable '{0}' not found."}, {DiagnosticCode ::ExpressionIsNotAFunction, "Called expression is not a function."}, {DiagnosticCode ::CantIndex, "Unable to index type {0} with {1}."}, {DiagnosticCode ::InvalidReturnType, "Invalid return type."},