- ComputerCraft | Programmable Computers for Minecraft
- → zwap1233's Content
zwap1233's Content
There have been 19 items by zwap1233 (Search limited from 10-February 22)
#36356 [Lua][Question] How does os.run() work?
#36349 [Lua][Question] How does os.run() work?
Posted by
zwap1233
on 02 October 2012 - 01:02 PM
in
Ask a Pro
Orwell, on 02 October 2012 - 12:55 PM, said:
http://www.computerc...hp?title=Os.run
You can find a bit of information on Environments here:
http://www.lua.org/pil/14.html
I quickly made some code illustrating the use:
test1
env = {}
env.a = function() return 42 end
os.run(env, 'test2')
test2
print(a())
Basically, the environment is a (meta)table that stores all global variables and functions (like fs, rednet, print(), ...).
So basically this allows you to run programs with adapted global vars/functions.
if i make a api and i call it test whit a method SlowPrint
and i run a program whit os.run(env,'program')
and local env = {['textutils'] = 'test'}
would the program run my SlowPrint method everytime when he calls 'textutils.SlowPrint()'?
and thanks for the links
#36347 [Lua][Question] How does os.run() work?
Posted by
zwap1233
on 02 October 2012 - 12:56 PM
in
Ask a Pro
Mtdj2, on 02 October 2012 - 12:42 PM, said:
Hope I helped.
Edit: Enviroment is where the variables are stored. (Or that is what I think...)
i know what shell.run() does but the environment option may give me a solution to a problem i have.
i want to run a program in a folder but the program must not go out that folder i hoped the environment argument would allow me to manipulate the program by making the program think he is using the normal apis but excutly he running my api that edits the path and than excutes the normal api whit the modifed path, i saw something like that in the shell. (os.run({['shell'] = shell}) , _sPath) but i'm not sure what it is doing and how i could use it myself.
#22439 1.4 black screen
Posted by
zwap1233
on 29 July 2012 - 11:16 AM
in
Bugs
Dirkus7, on 28 July 2012 - 06:35 PM, said:
zwap1233, on 28 July 2012 - 03:24 PM, said:
http://dl.dropbox.co...orge/Latest.txt
http://minecraftforg.../topic,5.0.html
thanks now it works (:
#22162 1.4 black screen
Posted by
zwap1233
on 28 July 2012 - 02:40 PM
in
Bugs
Cloudy, on 28 July 2012 - 11:58 AM, said:
C:UsersWouterDesktop>java -Xms1G -Xmx1G -cp Minecraft.exe net.minecraft.Launc herFrame 1>log.txt jul 28, 2012 4:37:51 PM cpw.mods.fml.common.FMLCommonHandler beginLoading INFO: Attempting early MinecraftForge initialization jul 28, 2012 4:37:51 PM cpw.mods.fml.common.FMLCommonHandler beginLoading INFO: Completed early MinecraftForge initialization 2012-07-28 16:37:51 [INFO] Forge Mod Loader version 2.2.48.135 for Minecraft 1.2 .5 loading 2012-07-28 16:37:51 [INFO] Loading mods from C:UsersWouterAppDataRoaming.mi necraftmods 2012-07-28 16:37:51 [INFO] Forge Mod Loader has loaded 3 mods 2012-07-28 16:37:51 [INFO] MinecraftForge v3.3.7.135 Initialized Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: forg e/IEntityLivingHandler at mod_CCTurtle.load(mod_CCTurtle.java:35) at cpw.mods.fml.common.modloader.ModLoaderModContainer.init(ModLoaderMod Container.java:324) at cpw.mods.fml.common.Loader.modInit(Loader.java:263) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:604) at cpw.mods.fml.client.FMLClientHandler.onLoadComplete(FMLClientHandler. java:203) at net.minecraft.client.Minecraft.a(Minecraft.java:426) at net.minecraft.client.Minecraft.run(Minecraft.java:735) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: forge.IEntityLivingHandler at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 8 more
TheOutcast5, on 28 July 2012 - 11:26 AM, said:
not the case
#22115 1.4 black screen
Posted by
zwap1233
on 28 July 2012 - 11:19 AM
in
Bugs
if i did something wrong can someone tell me?
#21145 ALL YOUR BASE ARE BELONG TO LULZSEC
Posted by
zwap1233
on 24 July 2012 - 07:59 PM
in
General
abc, on 10 June 2012 - 07:46 PM, said:
thesbros, on 25 May 2012 - 05:29 PM, said:
abc, on 25 May 2012 - 04:32 AM, said:
BigSHinyToys, on 25 May 2012 - 04:29 AM, said:
as for them owing the forums you have done nothing of any consequence.
thesbros, on 25 May 2012 - 04:01 AM, said:
'Nuff said.
So,
I win.
dude you started talking about posting obsesion and ended at "how to crash a server"!
#20418 how do i test my pheripheral?
Posted by
zwap1233
on 21 July 2012 - 12:22 PM
in
Peripheral Help and Discussion
1. like the title says how do i test my pheripheral? after making the class and adding the ccapi and instaling forge(that went all well) do i just start recompile.bat or do i first have to remove the api? and is there a easier way?
2. what class must implement the IPheripheral iterface? the basemod class or the block class i made?
zwap1233
#20410 Creating Peripherals and Turtle Upgrades (Updated for 1.5)
Posted by
zwap1233
on 21 July 2012 - 11:59 AM
in
Peripherals and Turtle Upgrades
- ComputerCraft | Programmable Computers for Minecraft
- → zwap1233's Content


