I have just made OS for my use only. It has "Run program" feature.
Problem:
When i run program that has error with this feature, it will crash OS. Is there way to run startup always when program closes?
I will not give code, because i have meant it only for my use. If you dont know how to solve this without the code then you cant help me.
OS run feature help
Started by Boss Nomad, Dec 29 2012 02:59 AM
5 replies to this topic
#1
Posted 29 December 2012 - 02:59 AM
#3
Posted 29 December 2012 - 03:20 AM
You can always pcall a loadstring.
#4
Posted 29 December 2012 - 07:40 AM
There wasnt alot info about it, can someone explain me more about pcall?
#5
Posted 29 December 2012 - 05:09 PM
Not really feeling like it. But the link grabie2 provided explains pretty much all there is to explain.
#6
Posted 29 December 2012 - 09:22 PM
pcall is pretty simple: instead of calling function like that:
os.loadAPI("awesomeAPI")
you call it like that:local ok, p1, p2, p3 = pcall(os.loadAPI, "awesomeAPI") if not ok then errorMessage = p1 else --everything went OK endsimple, huh?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











