maybe launcher question. You can redownload and resetup it
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: PSL on Jul 02, 2023, 10:53 AMThanks for sharing some useful code, butold code, outdated, new utils code will be release
This is my codelocal arr=[1,6,2,78,123,1,23,2,5];
local arr2=sort(arr);
for(local i=0;i<arr2.len();i++) print(arr2[i]);
In the sort function, an error occurred on this line:
foreach (v in arr) if (!IsNum(v)) number = false
error is: AN ERROR HAS OCCURED [parameter 1 has an invalid type 'integer' ; expected: 'string']
Quote from: Mohamed Boubekri on Aug 14, 2023, 11:24 AMQuote from: 2b2ttianxiu on Feb 01, 2023, 08:00 AMfunction errorHandling(err) {
local stackInfos = getstackinfos(2);
if (stackInfos) {
local locals = "";
foreach (index, value in stackInfos.locals) {
locals = locals + "[" + index + ": " + type(value) + "] " + value + "\n";
}
local callStacks = "";
local level = 2;
do {
callStacks += "*FUNCTION [" + stackInfos.func + "()] " + stackInfos.src + " line [" + stackInfos.line + "]\n";
level++;
} while ((stackInfos = getstackinfos(level)));
local errorMsg = "AN ERROR HAS OCCURRED [" + err + "]\n";
errorMsg += "\nCALLSTACK\n";
errorMsg += callStacks;
errorMsg += "\nLOCALS\n";
errorMsg += locals;
foreach (i, msg in split(errorMsg, "\n")) print(msg)
}
}
seterrorhandler(errorHandling);[/quote]
Hey @2b2ttianxiu, how i can use that function ? i don't understand where do i will place it, or how i will mention it.