Skip to content

Commit 07e2492

Browse files
optimized the expression of the two new warnings in gdscript_warning.cpp
1 parent e5bbfee commit 07e2492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gdscript/gdscript_warning.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ String GDScriptWarning::get_message() const {
164164
return R"("@onready" will set the default value after "@export" takes effect and will override it.)";
165165
case ACCESS_PRIVATE_MEMBER:
166166
CHECK_SYMBOLS(1);
167-
return vformat(R"(Trying to access a private member "%s" from an external place, which would cause problems during runtime.)", symbols[0]);
167+
return vformat(R"(The member "%s" is private. It should not be accessed from an external script.)", symbols[0]);
168168
case CALL_PRIVATE_METHOD:
169169
CHECK_SYMBOLS(1);
170-
return vformat(R"*(Trying to call a private method "%s()" from an external place, which would cause problems during runtime.)*", symbols[0]);
170+
return vformat(R"*(The method "%s()" is private. It should not be called from an external script.)*", symbols[0]);
171171
#ifndef DISABLE_DEPRECATED
172172
// Never produced. These warnings migrated from 3.x by mistake.
173173
case PROPERTY_USED_AS_FUNCTION: // There is already an error.

0 commit comments

Comments
 (0)