Jump to content


YUGATUG's Content

There have been 54 items by YUGATUG (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#218176 shell help?

Posted by YUGATUG on 22 May 2015 - 01:55 AM in Ask a Pro

View PostBomb Bloke, on 22 May 2015 - 12:42 AM, said:

View PostLupus590, on 21 May 2015 - 08:55 PM, said:

does ls (LS) work?

View PostLyqyd, on 22 May 2015 - 01:48 AM, said:

What's the error? You may have accidentally created a file named "dir" that's being run instead of /rom/programs/list whenever your current working directory is the folder it's in (perhaps root).
will get back to you guys tommorow



#218153 shell help?

Posted by YUGATUG on 21 May 2015 - 10:13 PM in Ask a Pro

View PostLyqyd, on 21 May 2015 - 09:49 PM, said:

Moved to Ask a Pro.
k



#218141 shell help?

Posted by YUGATUG on 21 May 2015 - 09:10 PM in Ask a Pro

View PostLupus590, on 21 May 2015 - 08:55 PM, said:

does ls (LS) work?

are you sure that you are not in the lua prompt?
Yea, i entered and exited the lua prompt just to make sure. Rebooted my (virtual) computer too, still not working. No programs in the autorun folder. strangley, when i AM in a directory, 'dir' works exactly as i expect it to.

View PostKingofGamesYami, on 21 May 2015 - 09:03 PM, said:

If that doesn't work, someone may have changed you aliases. Try using the full path:

rom/programs/list

I don't know the full path though, that is why i was using 'dir'



#218135 shell help?

Posted by YUGATUG on 21 May 2015 - 08:44 PM in Ask a Pro

When i type in 'dir' in to the shell of my advanced computer, it gives me an error. I am certain 'dir' used to show all the directories stored in the computer. What should i do to see and access the directories?



#214113 Program request

Posted by YUGATUG on 15 April 2015 - 09:17 PM in General

View PostHPWebcamAble, on 15 April 2015 - 03:47 AM, said:

Just PM'd my submission, for anyone reading this
Pm'd you with response



#214100 Program request

Posted by YUGATUG on 15 April 2015 - 07:37 PM in General

View PostBomb Bloke, on 15 April 2015 - 06:26 AM, said:

Just to play devil's advocate, why'd you take the protective label off the gift card? ;) :P
How else am I supposed to cash it in?



#214045 Program request

Posted by YUGATUG on 15 April 2015 - 02:43 AM in General

View PostLupus590, on 15 April 2015 - 01:58 AM, said:

We generally don't take requests, preferring to help teach people how to write programs so they can become independent. You know, the teach a man to fish thing.

As for the payment via gift card code, isn't that against the rules of the gift card?

Ya I know the goal of the forum, but I've been working on this topic for 3 weeks and want to just get it done and over with.
Also, i don't think that's against the rules of the card, nor do i care about the rules of the card.



#214039 Program request

Posted by YUGATUG on 15 April 2015 - 01:22 AM in General

I want a program that has the following syntax:
Enderchest add <string>
Enderchest add <string> <info>
Enderchest list
Enderchest search <string>
Enderchest delete <string>
Enderchest help

Background: I use a lot of Ender chests from the Ender Storage mod. Keeping track of these by memory is very hard, so i want a CC program to keep track of it.

Enderchest add <string> will add <string> to a document of strings such that they will be able to be accessible by Enderchest list, Enderchest search, and Enderchest delete. If the command is successful, the terminal will print(<string> .. " has been successfully added.") . If <string> was already on the list, the program will not add <string> to the list and the terminal will print(<string> .. "was already on the list.") . Enderchest add <string> <info>** will do the same thing as Enderchest add <string> , but will allow you to add info that will show up when the user uses Enderchest search <string> . Enderchest list will list all of the strings stored with Enderchest add. If there are too many strings to display on the screen (be it pocket computer or standard computer), the bottom center of the screen will read: "Hit [W] and [S] to scroll up and down the list, and hit [SPACE] to exit scroll mode.", and the user will be able to scroll as described (if you have/want to change it from [W] and [S] and [SPACE] to [UP] and [DOWN] and [ENTER], that works too). Enderchest search <string> will print out <string>, and if <string> was added via Enderchest add <string> <info> , <info> will be printed after <string>, separated by a space. *if <string> is added using Enderchest add <string> , the user must use Enderchest delete <string> then Enderchest add <string> <info> to give <string> info.* if <string> was never added, the terminal will print("<string> .. " is not on the list."). Enderchest delete <string> will delete <string> from the document of strings. If <string> is was not on the list, the terminal will print(<string> .. " is not on the list."). If it was, the terminal will print(<string> .. " has been deleted.") Enderchest help will print the syntax of the program.

What's that? You have no reason to do this?
Wrong. The first person to pm me the program gets the code for a $15 iTunes gift card.

What? You don't believe i have the card?
Wrong again. http://imgur.com/Pn4JDL5,RjpWM4C#0 http://imgur.com/Pn4JDL5,RjpWM4C#1 . The green is to prevent you from cashing in the gift card without me telling you the code.

Huh? You think I've already used up the card? You think I won't give you the code anyway?
Well, I can't prove you wrong until you pm me your program. Though, I do guarantee you i will give you the code.

Ask me any questions in the discussion section below.



#214038 how to print document?

Posted by YUGATUG on 15 April 2015 - 12:29 AM in Ask a Pro

View PostHPWebcamAble, on 14 April 2015 - 11:46 PM, said:

View PostYUGATUG, on 14 April 2015 - 10:17 PM, said:

make the program as i describe

I don't think this thread actually has a full description of the program. Maybe you should lay out how it should work in one post

You can also try posting in the General section so that more people see it, although I'm not sure if the Admins will let you do the gift card thing

oh, i guess you're right, i thought i had typed it out already.



#214027 how to print document?

Posted by YUGATUG on 14 April 2015 - 10:17 PM in Ask a Pro

Here's the deal: I'm getting bored of this project. I have the code for a 15 dollar itunes gift card. First person to make the program (with the added scrolling feature *it must work on both pocket computers and regular ones*) as i describe gets the code. (make sure to pm your program to me, i will pm the code back.)

What's that you say? You don't believe i have the gift card? http://imgur.com/Pn4JDL5,RjpWM4C#0 and http://imgur.com/Pn4JDL5,RjpWM4C#1 . the green is to prevent you from seeing the information to cash it in without me wanting you to.

Huh? You think i've already used up the balance of the card?
Well, you might be right. I haven't, but i can't prove to you i haven't.

What? You think i won't give you the code?
You might be right again. I can't sign an internet contract because those don't exist, but i will give you the code.

Your move, internet.



#214025 how to print document?

Posted by YUGATUG on 14 April 2015 - 09:54 PM in Ask a Pro

View PostHPWebcamAble, on 12 April 2015 - 05:02 PM, said:

View PostYUGATUG, on 12 April 2015 - 04:35 PM, said:

if i understand you correctly, that's saying that if <string> does not match k, then the program will write in k (k is the current string the program is comparing against, right?). if it does, the program will print(<string> .. "was never on the list.") , which means that the <string> in the document will never be deleted. Am i understanding your code correctly?

Actually, the idea is that it will open the file that stores them, and rewrite every line, EXCEPT the one you specify to delete.

Remember that when opening files in "w" mode, it deletes the content of the file before you write anything

oh, i didn't know opening a file in write mode deletes the contents of the file, that clears thing up. Thanks!



#214024 Private message?

Posted by YUGATUG on 14 April 2015 - 09:52 PM in Forum Discussion

Thanks!



#214021 Private message?

Posted by YUGATUG on 14 April 2015 - 09:46 PM in Forum Discussion

is there a way to read and write private messages within the forum?



#213713 how to print document?

Posted by YUGATUG on 12 April 2015 - 04:35 PM in Ask a Pro

View PostKingofGamesYami, on 11 April 2015 - 03:53 PM, said:

What I said will do that.
 elseif tArgs[ 1 ] == "delete" then if contents[ tArgs[ 2 ] ] then --#if it is there local file = fs.open( "myFile", "w" ) --#open the file for k, v in pairs( contents ) do --#iterate if tArgs[ 2 ] ~= k then --#if it's not the line to delete file.writeLine( k ) --#write it down end end else print( tArgs[ 2 ] .. " was never on the list." ) end end 
line 5 and 6:
--#if it's not the line to delete
--#write it down
if i understand you correctly, that's saying that if <string> does not match k, then the program will write in k (k is the current string the program is comparing against, right?). if it does, the program will print(<string> .. "was never on the list.") , which means that the <string> in the document will never be deleted. Am i understanding your code correctly?



#213557 how to print document?

Posted by YUGATUG on 11 April 2015 - 03:48 PM in Ask a Pro

You're not understanding what I want to do with the delete feature.
When i type 'Enderchest delete <string>' I want the program to run through the strings in the document to see if <string> matches any of the stored strings. If it does, delete the string in the list, and print(<string> .. "has been deleted.) . else, print(<string> .. "was never on the list.")



#213036 how to print document?

Posted by YUGATUG on 08 April 2015 - 09:14 PM in Ask a Pro

You are honestly amazing bro, I am speechless. Thank you so much for the help!

So far you've pretty much written my code for me, which I'm not opposed to if you're not, so if you'd make the program for me that'd be AMAZING, but i totally understand if not.
If not, do you know how i'd be able to add the delete feature?

also, problem: if there are too many strings, the program will not display all of the strings. I wanted to have the user be able to use the up and down arrows to scroll up and down the list, then enter or space or some other special key to exit scroll mode, with text at the bottom of the screen constantly displaying "Hit [UP] and [DOWN] to scroll up and down the list, and hit space/enter to exit scroll mode." until the user exits scroll mode. I have no idea how i'd even begin to write that, can you help me out?



#213018 how to print document?

Posted by YUGATUG on 08 April 2015 - 07:36 PM in Ask a Pro

Wow dude, thanks for the help!

Do you know how i'd add in the list feature? I don't really understand you're code so i can't edit it...



#212938 how to print document?

Posted by YUGATUG on 08 April 2015 - 12:06 AM in Ask a Pro

My end goal is to have a program that will have this syntax: Enderchest add <string>/Enderchest search <string>/Enderchest list/Enderchest delete <string> . Enderchest add <string> will add a string to a document of strings (for storage after the program ends). Enderchest search <string> will take <string> and compare it to the strings in the document. If the program finds that <string> and one of the strings in the document match, it will print(<string>.." is in use."). else, it will print(<string>.." is available."). Enderchest list will list out all of the strings in the document (if there are too many to display, it will allow you to hit up and down to go up and down the list). Enderchest delete <string> will delete <string> from the document. if <string> was never in the document, it will print(<string>.." was not on the list."). else, it will print(<string>.."has been deleted.")

right now, i'm coding a prototype, and im trying to make the stage where i make list of strings. to do this, i am using .writeLine(). the problem with .writeLine() is that when it is used like so: 'document.writeLine(array[1])', whatever is stored in the first spot of array will become the first line of document. In effect, that means document.writeLine(array[2]) makes the second line of document whatever is stored in the first spot of array. that means this means that i can't use .writeLine(array[1]) everytime, because then the previous <string>'s get lost.

to counteract that, i tried to count the number of times the user adds strings (hence the i = i + 1), so that the line <string> gets written to doesn't overwrite previous strings. but, once all is said and done, the program ends, and i gets reset to one.

That is currently what i'm trying to solve.

Thanks for commenting my horrendous code by the way! it cleared up the purpose to myself :D



#212931 how to print document?

Posted by YUGATUG on 07 April 2015 - 11:11 PM in Ask a Pro

pastebin.com/PACL177r

Tried to make the string store on top of eachother, but the i variable is lost at the end of the program, rendering it useless. Help?



#212782 how to print document?

Posted by YUGATUG on 06 April 2015 - 11:15 PM in Ask a Pro

how do i open the file in append mode? do i use an "a" instead of a "w" or a "r"?



#212736 find out type of variable?

Posted by YUGATUG on 06 April 2015 - 09:15 PM in Ask a Pro

Uh... What is this ninja'd thing? Also thanks
MKlegoman357



#212716 find out type of variable?

Posted by YUGATUG on 06 April 2015 - 08:34 PM in Ask a Pro

Is there an api or function to get the type of variable a variable is?



#212698 how to print document?

Posted by YUGATUG on 06 April 2015 - 08:16 PM in Ask a Pro

pastebin.com/Hm8YAJtw
Getting an error on line 10, don't know why. help? fixed the error, put 3 dots instead of 2 to combine strings.



#212691 how to print document?

Posted by YUGATUG on 06 April 2015 - 08:08 PM in Ask a Pro

not at all... when i apply this to program, i'm going to have this syntax: "Enderchest add <string>", and i want all strings added using that command to be stored, but using the method i currently am, if i type "Enderchest add yolo" then "Enderchest add gg" yolo will not be stored, but i want it to be.



#212682 how to print document?

Posted by YUGATUG on 06 April 2015 - 07:33 PM in Ask a Pro

Another question: using writeLine(), myDocument gets written to the first line of myDocument.txt, but i want myDocument to be added to myDocument.txt. how would i do this?