You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: [core]/es_extended/client/common.lua
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,5 @@ end)
4
4
5
5
AddEventHandler("esx:getSharedObject", function()
6
6
localInvoke=GetInvokingResource()
7
-
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
7
+
error(("Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
returnprint(("[^1ERROR^7] Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource))
356
+
returnerror(("Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource))
Copy file name to clipboardExpand all lines: [core]/es_extended/locale.lua
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ Locales = {}
2
2
3
3
functionTranslate(str, ...) -- Translate string
4
4
ifnotstrthen
5
-
print(("[^1ERROR^7] Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() orGetCurrentResourceName()))
5
+
error(("Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() orGetCurrentResourceName()))
6
6
return"Given translate function parameter is nil!"
returnprint("[^1ERROR^7] xPlayer.removeWeapon ^5invalid^7 player ped!")
601
+
returnerror("xPlayer.removeWeapon ^5invalid^7 player ped!")
602
602
end
603
603
604
604
fork, vinipairs(self.loadout) do
@@ -755,12 +755,12 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
755
755
end
756
756
757
757
iftype(index) ~="string" then
758
-
returnprint("[^1ERROR^7] xPlayer.getMeta ^5index^7 should be ^5string^7!")
758
+
returnerror("xPlayer.getMeta ^5index^7 should be ^5string^7!")
759
759
end
760
760
761
761
localmetaData=self.metadata[index]
762
762
ifmetaData==nilthen
763
-
returnConfig.EnableDebugandprint(("[^1ERROR^7] xPlayer.getMeta ^5%s^7 not exist!"):format(index)) ornil
763
+
returnConfig.EnableDebuganderror(("xPlayer.getMeta ^5%s^7 not exist!"):format(index)) ornil
764
764
end
765
765
766
766
ifsubIndexandtype(metaData) =="table" then
@@ -779,14 +779,14 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
779
779
iftype(key) =="string" then
780
780
returnValues[key] =self.getMeta(index, key)
781
781
else
782
-
print(("[^1ERROR^7] xPlayer.getMeta subIndex should be ^5string^7 or ^5table^7! that contains ^5string^7, received ^5%s^7!, skipping..."):format(type(key)))
782
+
error(("xPlayer.getMeta subIndex should be ^5string^7 or ^5table^7! that contains ^5string^7, received ^5%s^7!, skipping..."):format(type(key)))
783
783
end
784
784
end
785
785
786
786
returnreturnValues
787
787
end
788
788
789
-
returnprint(("[^1ERROR^7] xPlayer.getMeta subIndex should be ^5string^7 or ^5table^7!, received ^5%s^7!"):format(_type))
789
+
returnerror(("xPlayer.getMeta subIndex should be ^5string^7 or ^5table^7!, received ^5%s^7!"):format(_type))
790
790
end
791
791
792
792
returnmetaData
@@ -798,28 +798,28 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
798
798
---@returnvoid
799
799
functionself.setMeta(index, value, subValue)
800
800
ifnotindexthen
801
-
returnprint("[^1ERROR^7] xPlayer.setMeta ^5index^7 is Missing!")
801
+
returnerror("xPlayer.setMeta ^5index^7 is Missing!")
802
802
end
803
803
804
804
iftype(index) ~="string" then
805
-
returnprint("[^1ERROR^7] xPlayer.setMeta ^5index^7 should be ^5string^7!")
805
+
returnerror("xPlayer.setMeta ^5index^7 should be ^5string^7!")
806
806
end
807
807
808
808
ifvalue==nilthen
809
-
returnprint("[^1ERROR^7] xPlayer.setMeta value is missing!")
809
+
returnerror("xPlayer.setMeta value is missing!")
810
810
end
811
811
812
812
local_type=type(value)
813
813
814
814
ifnotsubValuethen
815
815
if_type~="number" and_type~="string" and_type~="table" then
816
-
returnprint(("[^1ERROR^7] xPlayer.setMeta ^5%s^7 should be ^5number^7 or ^5string^7 or ^5table^7!"):format(value))
816
+
returnerror(("xPlayer.setMeta ^5%s^7 should be ^5number^7 or ^5string^7 or ^5table^7!"):format(value))
817
817
end
818
818
819
819
self.metadata[index] =value
820
820
else
821
821
if_type~="string" then
822
-
returnprint(("[^1ERROR^7] xPlayer.setMeta ^5value^7 should be ^5string^7 as a subIndex!"):format(value))
822
+
returnerror(("xPlayer.setMeta ^5value^7 should be ^5string^7 as a subIndex!"):format(value))
823
823
end
824
824
825
825
ifnotself.metadata[index] ortype(self.metadata[index]) ~="table" then
@@ -834,16 +834,16 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
834
834
835
835
functionself.clearMeta(index, subValues)
836
836
ifnotindexthen
837
-
returnprint("[^1ERROR^7] xPlayer.clearMeta ^5index^7 is Missing!")
837
+
returnerror("xPlayer.clearMeta ^5index^7 is Missing!")
838
838
end
839
839
840
840
iftype(index) ~="string" then
841
-
returnprint("[^1ERROR^7] xPlayer.clearMeta ^5index^7 should be ^5string^7!")
841
+
returnerror("xPlayer.clearMeta ^5index^7 should be ^5string^7!")
842
842
end
843
843
844
844
localmetaData=self.metadata[index]
845
845
ifmetaData==nilthen
846
-
returnConfig.EnableDebugandprint(("[^1ERROR^7] xPlayer.clearMeta ^5%s^7 does not exist!"):format(index)) ornil
846
+
returnConfig.EnableDebuganderror(("xPlayer.clearMeta ^5%s^7 does not exist!"):format(index)) ornil
847
847
end
848
848
849
849
ifnotsubValuesthen
@@ -854,7 +854,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
854
854
iftype(metaData) =="table" then
855
855
metaData[subValues] =nil
856
856
else
857
-
returnprint(("[^1ERROR^7] xPlayer.clearMeta ^5%s^7 is not a table! Cannot clear subValue ^5%s^7."):format(index, subValues))
857
+
returnerror(("xPlayer.clearMeta ^5%s^7 is not a table! Cannot clear subValue ^5%s^7."):format(index, subValues))
858
858
end
859
859
elseiftype(subValues) =="table" then
860
860
-- If subValues is a table, we will clear multiple subValues within the table
@@ -864,14 +864,14 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
864
864
iftype(metaData) =="table" then
865
865
metaData[subValue] =nil
866
866
else
867
-
print(("[^1ERROR^7] xPlayer.clearMeta ^5%s^7 is not a table! Cannot clear subValue ^5%s^7."):format(index, subValue))
867
+
error(("xPlayer.clearMeta ^5%s^7 is not a table! Cannot clear subValue ^5%s^7."):format(index, subValue))
868
868
end
869
869
else
870
-
print(("[^1ERROR^7] xPlayer.clearMeta subValues should contain ^5string^7, received ^5%s^7, skipping..."):format(type(subValue)))
870
+
error(("xPlayer.clearMeta subValues should contain ^5string^7, received ^5%s^7, skipping..."):format(type(subValue)))
871
871
end
872
872
end
873
873
else
874
-
returnprint(("[^1ERROR^7] xPlayer.clearMeta ^5subValues^7 should be ^5string^7 or ^5table^7, received ^5%s^7!"):format(type(subValues)))
874
+
returnerror(("xPlayer.clearMeta ^5subValues^7 should be ^5string^7 or ^5table^7, received ^5%s^7!"):format(type(subValues)))
Copy file name to clipboardExpand all lines: [core]/es_extended/server/common.lua
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ end)
20
20
21
21
AddEventHandler("esx:getSharedObject", function()
22
22
localInvoke=GetInvokingResource()
23
-
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
23
+
error(("Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
0 commit comments