• 0

    posted a message on New BUD Switch?
    It dosnt send a redstone signal so its not a BUD
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Wall block replacer
    Hello i am currently working on this and Ive almost got a solution i have one question tho. Can the toggle be separate from the replacement mechanism? meaning that it would not have to be 1 block wide.
    ---
    NWM that ive just found a solution for you
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on paying for combination lock builder
    The problem with your request is that you haven't thought through what exactly it is you want, i cant be the only one who spotted this but no one has seemed to raise the question.
    auto rest on wrong button or right button in wrong order

    This is a big security breach for any password input because its not something that the user contiguously have to do its something the system does for you. This will make it easier for "hackers" to crack the code because the system actually helps them. I know why this may seem like a good idea because then the user dosnt have to do as much but believe me its a pretty big breach.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from koiulpoi »
    Quote from kardocraft »
    This is really a super awesome mod!! I was thinking about making a adv map a la portal thing and this CPU is super for my idea (think about glados) I never did any programmering before this and I have a strange error.
    This is my code (it let just jump the player)
    func onTrigger(int global, int x, int y, int z, int random)
    if global==0
    PlayerJump()
    ChatMessage("Haha, je dacht dat je vermoordt zou worden he?") 
    return 1
    endif
    endfunc

    I can run it one time and then the second time it give this error: For input string: ''null''
    And then I can not run any script and I can only replace the CPU and it work again ONE time.

    When you "return" a number, it sets "global" to that number. So since you are returning 1, the code inside the block "if global==0" will never run after that.

    No idea what that string error is about, but remove the if and endif part of the code, run it, and see.

    Its because you set the global to 1 after youve run the script the first time and then when you run it the second time around you didn't return anything because your only returning something if global==0, it is illegal to make a function that dosnt return anything this can be solved by moving the return string out of the variable like this:
    func onTrigger(int global, int x, int y, int z, int random)
    if global==0
    PlayerJump()
    ChatMessage("Haha, je dacht dat je vermoordt zou worden he?") 
    endif
    return 1
    endfunc
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from Tom Cargill »
    The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from gurkenmaster »
    Quote from themuffin »
    Haven't looked at the Single Player Commands source, but it might provide an easy way to expand available functions, given permission from its author.

    Also, despite the potential utility of the mod, it's also ridiculously overpowered and programmer-oriented, so it's unlikely to be implemented in vanilla MC. (in response to a few who suggested such)


    It doesn't fit into the mode survival that's true but I don't think the CPU is here to be used for cheating.
    It fits in a sandbox game better.(omg what game am I talking about?)

    Biohazard something like getCurrentTime() that returns the current time(duh) would be nice and getBlockID your mod really needs more functions that return useful stuff instead of only changing things like BlockSpawn does.
    -snip-

    these things takes time Ive found some quotes witch some of you might find amusing if you've ever done any programming:
    Quote from Maurice Wilkes discovers debugging, 1949 »
    As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.

    Quote from Jeff Atwood »
    In software, we rarely have meaningful requirements. Even if we do, the only measure of success that matters is whether our solution solves the customer’s shifting idea of what their problem is.

    Quote from Larry Wall »
    Computer language design is just like a stroll in the park. Jurassic Park, that is.

    Quote from Rich Cook »
    Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from pokeman2010 »
    Quote from Luka4ever »
    Quote from pokeman2010 »
    um how do i make make it so it spawns in a random coord such as "BlockPos(x, y int random, z) " or a random id
    btw wut does (int global, int x, int y, int z, int random) after func onTrigger do

    Well to make it spawn in a random location you could use BlockPos(x+random,y,z,1)
    however this will most likely not work because the location of the position is most likely so far away that the location haven't been generated or isn't loaded.
    (int global, int x, int y, int z, int random) this is the parameters the function will accept, first is the data type this can be int, double or string for fscript, int is short for integer, double is a number variable that can hold decimal numbers witch so far for this mod doesn't really have the big uses, string is a variable that can contain text strings.
    After the data type comes the name of the variable witch is used as a reference to the data, after that you can Place a "," and declare the next variable.
    Hope this helped :smile.gif:

    good to know to keep the (int global, int x, int y, int z, int random) there btw i meant to use it so i can spawn a block at any hight or get a random block with a random integer for the id
    wait wut r text strings

    well you have to divide the random variable with something because it can get over 60000 (i dont know the precise number), and a text string is a connection of characters.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from pokeman2010 »
    um how do i make make it so it spawns in a random coord such as "BlockPos(x, y int random, z) " or a random id
    btw wut does (int global, int x, int y, int z, int random) after func onTrigger do

    Well to make it spawn in a random location you could use BlockPos(x+random,y,z,1)
    however this will most likely not work because the location of the position is most likely so far away that the location haven't been generated or isn't loaded.
    (int global, int x, int y, int z, int random) this is the parameters the function will accept, first is the data type this can be int, double or string for fscript, int is short for integer, double is a number variable that can hold decimal numbers witch so far for this mod doesn't really have the big uses, string is a variable that can contain text strings.
    After the data type comes the name of the variable witch is used as a reference to the data, after that you can Place a "," and declare the next variable.
    Hope this helped :smile.gif:
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from gurkenmaster »
    lol i found out that even code(i don't mean functions) outside of the onTrigger function gets run on redstone apply
    and how can i make vars not jump back to their old value when the function ends?

    save it on the global variable as shown on the floodgate script
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from gurkenmaster »
    -snip-

    Quote from Luka4ever »
    It levels an area of 21*21 around the CPU from the location of the CPU to the top of the map.
    you can change the area of effect by changing a to a number between 0 and 2,147,483,647 i think however i do advise against going over 50 as this takes some 20 seconds for my computer to run and it got a quite good CPU.
    Anyway enjoy :Pig:

    it's between 0 and ~300 cause the chunks behind that distance are unloaded and i don't think minecraft loads up to 134217727 chunks at the same time into the ram
    EDIT: I have a nice title now :Notch: :Notch:


    true but that dosnt mean the script for that area wont be run, however i doubt it will have an effect on the area.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from darkwalker247 »
    I can't find where the list of functions is :sad.gif:
    Can you help me?


    Quote from Biohazard »

    Break() #Stops the script
    BlockPos(int X, int Y, int Z, int BlockID) #Set XYZ where the block BlockID shall spawn
    BlockSpawn() #Spawn the block
    BlockDel() #Replaces the selected block with Air
    ChatMessage(String Chatmessage) #Add text to Chat
    ChatGlowMessage(String Chatmessage) #Make the text glow (Like the "Now Playing: Cat")
    PlayerHealth(int Health) #Change the health of the player
    PlayerJump() #Make the Player Jump
    PlayerHurt() #Hurt the player 2 Lifes
    WorldTime(int Time) #Change the world time


    And heres how the language works:
    http://fscript.sourceforge.net/fscript/page3.html
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Ive fixed my Tera Level script:
    func onTrigger(int global, int x, int y, int z, int random)
    	int a=10
    	LoopX(x-a,y,z-a,-a,-a,-a,a,a)
    	return 1
    endfunc
    
    func LoopX(int x, int y, int z, int c,int d,int e,int mx,int mz)
    	LoopY(x,y,z,c,d,e,mx,mz)
    	if c==mx then return 1
    	c=c+1
    	x=x+1
    	return LoopX(x,y,z,c,d,e,mx,mz)
    endfunc
    
    func LoopY(int x, int y, int z, int c,int d,int e,int mx,int mz)
    	LoopZ(x,y,z,c,d,e,mx,mz)
    	if d==128 then return 1
    	d=d+1
    	y=y+1
    	return LoopY(x,y,z,c,d,e,mx,mz)
    endfunc
    
    func LoopZ(int x, int y, int z, int c,int d,int e,int mx,int mz)
    	BlockPos(x,y,z,1)
    	BlockDel()
    	if e==mz then return 1
    	e=e+1
    	z=z+1
    	return LoopZ(x,y,z,c,d,e,mx,mz)
    endfunc

    It levels an area of 21*21 around the CPU from the location of the CPU to the top of the map.
    you can change the area of effect by changing a to a number between 0 and 2,147,483,647 i think however i do advise against going over 50 as this takes some 20 seconds for my computer to run and it got a quite good CPU.
    Anyway enjoy :Pig:
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from gurkenmaster »
    Quote from Luka4ever »
    Quote from gurkenmaster »
    -snip-
    EDIT: i don't like the while loop anymore cause using functions that call each other worked without problems(i got stairs instead of walls but it's at least working)

    would you like to share the script? :tongue.gif:

    remove the comments and the script will run fine
    func onTrigger(int global, int x, int y, int z, int random)
    int a=16 // should give me a 16x16 wall but it doesn't
    Loop(x+1,y,z,42,0,a,a) // 42 is the block id(iron block)
    return 1
    endfunc
    func Loop(int x, int y, int z, int ID, int c,int mx,int my)
    Loop2(x,y,z,ID,c,mx,my)
    if c==mx then return 1
    c=c+1
    x=x+1
    return Loop(x,y,z,ID,c,mx,my)
    endfunc
    func Loop2(int x, int y, int z, int ID, int c,int mx,int my)
    BlockPos(x,y,z,ID)
    BlockSpawn()
    if c==my then return 1
    c=c+1
    y=y+1
    return Loop2(x,y,z,ID,c,mx,my)
    endfunc

    here's the preview(the wallthingy behind is a stair that is 48 blocks high)

    feel free to make it working right :biggrin.gif:

    Ive fixed it:
    func onTrigger(int global, int x, int y, int z, int random)
    	int a=16
    	Loop(x+1,y,z,42,0,0,a,a)
    	return 1
    endfunc
    
    func Loop(int x, int y, int z, int ID, int c,int d,int mx,int my)
    	Loop2(x,y,z,ID,c,d,mx,my)
    	if c==mx then return 1
    	c=c+1
    	x=x+1
    	return Loop(x,y,z,ID,c,d,mx,my)
    endfunc
    
    func Loop2(int x, int y, int z, int ID, int c,int d,int mx,int my)
    	BlockPos(x,y,z,ID)
    	BlockSpawn()
    	if d==my then return 1
    	d=d+1
    	y=y+1
    	return Loop2(x,y,z,ID,c,d,mx,my)
    endfunc
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    Quote from gurkenmaster »
    Quote from pokeman2010 »
    Quote from gurkenmaster »
    Dude your CPU Block has enough functions to make a snake game inside minecraft but there is a problem. HOW THE HELL DO I CONTROL THE SNAKE? The CPU Block needs more inputs or a way to get the IDs of the Blocks.

    for example:getBlockID(x ,y ,z) returns the block id at those coordinates

    maybe even metadata? :biggrin.gif: (these thingys that make the wool coloured and the redstone red(metadata is only 4 bit(a number between 0 and 15 could be stored with it(0 means unpowered and metadata > 0 means powered(actually i'm just guessing)))))

    and add to BlockPos(int X, int Y, int Z, int BlockID)
    a version that let's you change the metadata of blocks to make coloured wool

    multiple cpus? for movement i would say pressure plates

    multiple cpus but how ? there is no kind of global variable that is usable on multiple cpus but if there was one that would work
    EDIT: i don't like the while loop anymore cause using functions that call each other worked without problems(i got stairs instead of walls but it's at least working)

    would you like to share the script? :tongue.gif:
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5_01]Programmable CPU (Version 2.2) GUI BUGFIX!
    isn't it possible to make a loop within a loop? or am i just stupid i tried to make a script to clear an area:
    func onTrigger(int global, int x, int y, int z, int random)
    	int a=0,b=0,c=0
    	while a<3
    		while b<3
    			while c<3
    				BlockPos(x-a+1, y-b+1, c+1, 1)
    				BlockDel()
    				c=c+1
    			endwhile
    			c=0
    			b=b+1
    		endwhile
    		b=0
    		a=a+1
    	endwhile
    	return 0
    endfunc

    But every time i run it, it just ends in Minecraft "crashing"
    Posted in: Minecraft Mods
  • To post a comment, please .