Mythruna
March 28, 2024, 02:34:04 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: OFF TOPIC SCRIPTING (cannot find essential help elsewhere)  (Read 21960 times)
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #15 on: December 20, 2012, 09:14:44 PM »

Unless its "old" windows lol

Like, earlier than Windows XP.
Windows 98 - from the future or the past?
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #16 on: December 20, 2012, 09:42:40 PM »

Sorry, Paul, but I find Winrar alot more fun to use. *winks*

Edit: I bet barely anyone here has Windows 8. (Including myself)
Logged

Mythruna: Don't you dare read any posts I made before 2014.
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #17 on: December 20, 2012, 10:32:45 PM »

i tried windows 8 like 6 months ago and gave up on it because it wasn't ready, i have 3 friends with it now and they seem to like it but are always being annoyed about something or rather so idk if ill switch i might just wait until they stop supporting windows 7
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #18 on: December 20, 2012, 10:47:50 PM »

i tried windows 8 like 6 months ago and gave up on it because it wasn't ready, i have 3 friends with it now and they seem to like it but are always being annoyed about something or rather so idk if ill switch i might just wait until they stop supporting windows 7

To me it looks like Microsoft got tired of getting picked on for shoving a desktop OS onto phones.  So instead, they now shove a phone OS onto desktops.

The most positive praise I've seen seems to think Microsoft has a vision where the computer is more an appliance like phones and stuff.  The thing is, in that case the OS doesn't really matter... users don't care what operating system their blu-ray player has, for example, as long as it runs blu-ray disks, connects to the web, etc..

Content is the new market.  Apple saw this which is why iTunes, app store, etc..  And Amazon releasing a tablet was so obviously a good idea that the universe would have imploded if they hadn't done it.  My Kindle Fire could not be a more convenient device to use... it's like a two way street giving me content and sucking cash directly from my wallet... and it's all good either way.  In four or five years, if you don't control a content stream then you are a bit player just supplying things to the big guys.  I think even Apple might be heading to a point where the fact that they produce a phone is only ancillary.  They fight commoditization at every turn but it's kind of inevitable.  The more pure the content delivery endpoint gets the less the user cares about what particular brand of underlying thing it's running.  "Does it have Angry Birds?!?!"  "What button do I push for Netflix?"  etc.

Hey, I took an Unn thread off topic.  Wink
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #19 on: December 20, 2012, 11:02:37 PM »

i tried windows 8 like 6 months ago and gave up on it because it wasn't ready, i have 3 friends with it now and they seem to like it but are always being annoyed about something or rather so idk if ill switch i might just wait until they stop supporting windows 7

To me it looks like Microsoft got tired of getting picked on for shoving a desktop OS onto phones.  So instead, they now shove a phone OS onto desktops.

The most positive praise I've seen seems to think Microsoft has a vision where the computer is more an appliance like phones and stuff.  The thing is, in that case the OS doesn't really matter... users don't care what operating system their blu-ray player has, for example, as long as it runs blu-ray disks, connects to the web, etc..

Content is the new market.  Apple saw this which is why iTunes, app store, etc..  And Amazon releasing a tablet was so obviously a good idea that the universe would have imploded if they hadn't done it.  My Kindle Fire could not be a more convenient device to use... it's like a two way street giving me content and sucking cash directly from my wallet... and it's all good either way.  In four or five years, if you don't control a content stream then you are a bit player just supplying things to the big guys.  I think even Apple might be heading to a point where the fact that they produce a phone is only ancillary.  They fight commoditization at every turn but it's kind of inevitable.  The more pure the content delivery endpoint gets the less the user cares about what particular brand of underlying thing it's running.  "Does it have Angry Birds?!?!"  "What button do I push for Netflix?"  etc.

Hey, I took an Unn thread off topic.  Wink

Aww, your first turn-off-topic. I'm so proud of you :') they grow up so fast..
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #20 on: December 21, 2012, 08:05:19 PM »

Grow down*
Logged

Mythruna: Don't you dare read any posts I made before 2014.
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #21 on: December 21, 2012, 09:15:35 PM »

lol
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #22 on: January 14, 2013, 08:53:44 PM »

You will find this much easier if you do it as a command line based app now and worry about a real window later.

I'm going to be exceedingly generous and show a block of code for reading commands from the command line:

Code:
BufferedReader in = new BufferedReader( new InputStreamReader(System.in) );
String line = null;
while( (line = in.readLine() ) {
    System.out.println( "You entered:" + line );
}

In a simple text adventure, that is your game loop.

I am just pulling this back up, sorry for bugging you though about this. That loop never did work. here is code:

Code:
package main;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Game {

static int x = 0;
static String user = null;

public static void main(String[] args) {

BufferedReader in = new BufferedReader( new InputStreamReader(System.in) );
String line = null;
while( (line = in.readLine() ) {
   System.out.println( "You entered:" + line );
}
}
}
it will give me error on line = in.readLine() saying to add the null pointer exception, then it says that it cannot convert from a String to a boolean. Undecided
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #23 on: January 14, 2013, 09:12:35 PM »

My code should work find but you have to do it as:
while( (line = in.readLine()) != null )

I was typing from memory.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #24 on: January 14, 2013, 09:14:22 PM »

And I have no idea what you are talking about with "add the null pointer exception".  That's ridiculous or you are in error.  Maybe you remembered the error message wrong?

It might have said something about IOException... which is a try/catch that should wrap this whole code block.  Or just let main throw Exception.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #25 on: January 14, 2013, 09:17:55 PM »

My code should work find but you have to do it as:
while( (line = in.readLine()) != null )

I was typing from memory.
Ah, ok I got it, thank you for the quick reply and sorry  Embarrassed

EDIT:
Quote from: pspeed
And I have no idea what you are talking about with "add the null pointer exception".  That's ridiculous or you are in error.  Maybe you remembered the error message wrong?

It might have said something about IOException... which is a try/catch that should wrap this whole code block.  Or just let main throw Exception.
It doesn't give the message anymore. It gave me the option of adding "throw IOException" or "surround with try/catch" and i chose IOException.
« Last Edit: January 14, 2013, 09:19:32 PM by Shzylo » Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #26 on: January 14, 2013, 09:36:57 PM »

Heh, figured out the BufferedWriter all by myself Smiley

Code:
BufferedReader in = new BufferedReader( new InputStreamReader(System.in) );
It seemed logic to turn BufferedReader into BufferedWriter, and InputStreamReader to OutputStreamWriter and System.in to System.out xD
Code:
BufferedWriter out = new BufferedWriter( new OutputStreamWriter(System.out) );
I believe this isn't right though...
Quote
while( (in.readLine() ) != null) {
         out.write("Start"); {
            System.out.println("Hello World!");
         }
      }
_Don't tell me though!_
« Last Edit: January 14, 2013, 09:41:40 PM by Shzylo » Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #27 on: January 14, 2013, 09:49:22 PM »

The real question is why you are trying to do that when you can already write to the console using System.out.println().

If you wanted to have your own writer then PrintWriter is better... then you can do out.println(), etc.

What you have should work other than the strange nested braces that don't do anything and have the System.out.println() in them.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #28 on: January 15, 2013, 02:26:39 PM »

I was trying to make it like the java.util.Scanner but i guess the scanner is all I can use xD i was tired at the time Smiley
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!