Jump to content




Gaa's Useful Functions


  • This topic is locked This topic is locked
5 replies to this topic

#1 xgaarocha

  • Members
  • 18 posts

Posted 23 February 2012 - 03:07 AM


This is a repository with all of the functions me (xgaarocha) and my friend (bravejuliano) created and are useful outside of our in-development Operational System. Bear in mind we have a "If it works it's good for now" policy currently, which means we will make it work first, finish the OS then optimize things. We don't guarantee 100% security and stability of our functions.



> Functions List_

  • Delay

  • Loading/Progress Bar



Delay

Function: Creates an interval with seconds/minutes/hours and can show a countdown.

Usage: interval(s, m, h, tleft) (Eg.: interval (0, 2, 0, "yes") > Shows a countdown of 2 minutes)

Parameters: s,m,h = seconds, minutes, hours / rleft = "yes" enables coutdown, leave blank or "no" to disable it.

Spoiler


Loading/Progress Bar
Function: Creates a bar that fills-up in a determined amount of time.

Usage: loadbar(s, char, size) (Eg.: loadbar(10, #, 10, "yes") > Creates a bar that fills up in 10 seconds with 10 #)
Parameters: s = duration in seconds / char = the character the bar is made of / size = bar's size, leave blank for auto


Spoiler


#2 xgaarocha

  • Members
  • 18 posts

Posted 26 February 2012 - 06:59 AM

250 view an 0 replies? Come on :)/>
If you have any suggestions on how to improve these functions just tell '-'

#3 vvenaya

  • Members
  • 27 posts

Posted 26 February 2012 - 07:43 AM

nice coding xgaarocha. well done.

one tip:

if s<0 then error("something")

can be rewritten as:

assert(s>=0,"something")

#4 TheNotch3000

  • New Members
  • 6 posts

Posted 26 February 2012 - 09:44 AM

looks nice! I will surely use this. :D/>

#5 Bladedemon70

  • New Members
  • 26 posts

Posted 26 February 2012 - 09:04 PM

Sorry for the noob question but for the loadbar do you replace all the paramater in the () or which ones do you need to replace

Nevermind i got it

#6 xgaarocha

  • Members
  • 18 posts

Posted 29 February 2012 - 05:28 PM

View Postvvenaya, on 26 February 2012 - 07:43 AM, said:

nice coding xgaarocha. well done.

one tip:

if s<0 then error("something")

can be rewritten as:

assert(s>=0,"something")

Oh, nice :unsure:/>/> Thanks





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users