
Howto try/catch: CreateSound failed to complete
Moderator: English Moderator
Howto try/catch: CreateSound failed to complete
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Re: Howto try/catch: CreateSound failed to complete
You can check if the link exists before creating.
See CHttpManager.
My testing script (seems some bugs mentioned in the linked topic are fixed now):
See CHttpManager.
My testing script (seems some bugs mentioned in the linked topic are fixed now):
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1">
<script><!--
main() {
declare CMlLabel MlResult;
declare Text Link;
MlResult = (Page.GetFirstChild("MlResult") as CMlLabel);
Link = "https://forum.maniaplanet.com/index.php";
MlResult.SetText("Checking link: " ^ Link);
if (Http.SlotsAvailable > 0) {
MlResult.SetText(MlResult.Value ^ " \nWe have free http slots (" ^ Http.SlotsAvailable ^ ").");
if (Http.IsValidUrl(Link)) {
MlResult.SetText(MlResult.Value ^ " \nLink is valid.");
declare Request <=> Http.CreateGet(Link) ;
wait(Request.IsCompleted);
if (Request.StatusCode == 200) {
MlResult.SetText(MlResult.Value ^ " \nLink is available :)");
} else {
MlResult.SetText(MlResult.Value ^ " \nLink unavailable :(");
}
Http.Destroy(Request);
Request = Null;
} else {
MlResult.SetText(MlResult.Value ^ " \nLink is not valid!");
}
} else {
MlResult.SetText(MlResult.Value ^ " \nNo free http slots!");
}
}
--></script>
<timeout>0</timeout>
<label id="MlResult" posn="-95 10 3" sizen="170 10" halign="top" valign="left" text="History:" autonewline="1" />
</manialink>
Who is online
Users browsing this forum: No registered users and 1 guest