Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Midp 2.0 game

Options
2»

Comments

  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by The Corinthian
    I don't think the script is what needs changing.
    You have file variables in there, right?:confused:, all the $file(something like that) stuff look like variables I afto change to the actual files name (MenuScreen.jar). Or does the code find the .jar file in it's directory automatically; is it right to call it .html does it afto be .wml?.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by OfflerCrocGod
    You have file variables in there, right?:confused:, all the $file(something like that) stuff look like variables I afto change to the actual files name (MenuScreen.jar). Or does the code find the .jar file in it's directory automatically; is it right to call it .html does it afto be .wml?.
    Cut and past it into a text file with a PHP extension (say 'index.php'), drop it into a directory on the folder and whatever jar files you want in with it. It reads the fso in the directory and generates a menu of links to the Jar files automatically.

    I'm surprised you couldn't work this out yourself as the principles of programming (Web or otherwise) are much the same in any language. It's not rocket science (unless you're a client, in which case it is and worth every penny :rolleyes: ).

    Overall, it's a very basic script, but it works. Certainly it can be improved upon, but I wasn't going to spend that much time on it. If you want any further support for it, I suggest you teach yourself PHP, it's easy enough to do and a day's playing around will be all you'll need.

    TBH, put a bit of effort into things, or you'll be waiting tables when you finish that BSc of yours.


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by The Corinthian
    Cut and past it into a text file with a PHP extension (say 'index.php'), drop it into a directory on the folder and whatever jar files you want in with it. It reads the fso in the directory and generates a menu of links to the Jar files automatically.
    I have tried that and it does nothing other then it tries to download the index.php page when i connect using a regular browser

    http://csserver.ucd.ie/~s01bf007/php/index.php
    Originally posted by The Corinthian
    I'm surprised you couldn't work this out yourself as the principles of programming (Web or otherwise) are much the same in any language. It's not rocket science (unless you're a client, in which case it is and worth every penny :rolleyes: ).
    I thought PHP was a mark-up language looking at it now it looks more powerful then that.
    Originally posted by The Corinthian
    TBH, put a bit of effort into things, or you'll be waiting tables when you finish that BSc of yours.
    It must be brilliant being born knowing everything the rest of the human race can only look on in amazement as you blind us all with your omniscience. No right now I'm a little busy with projects so I dont have the time to learn PHP - I was just trying to be helpful; sorry about that.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    I tried that link. It just times out on the phone. Its dreadfully slow (when I tried in a browser)


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by Hobbes
    I tried that link. It just times out on the phone. Its dreadfully slow (when I tried in a browser)
    Since I'm on a local network it's very fast and I can get a download of 30+MB of index.php - I cannot figure out why its so large :confused:; thats why I was wondering wheter it was something with the code - I didn't really look at it and I wont have some time until later on today - so if anyone has a clue I'm quite happy to try anything out. The jar is in there with the .php file on its own.


  • Advertisement
  • Registered Users Posts: 1,785 ✭✭✭Farls


    This is amazing the amount of effort you guys are putting into this, i find it all quite interesting though as i guess ye do as well.

    I tried that link there croc and i downloaded 128mb and then just stopped i'm on college connection so dloadin at 1.5mb/s

    Farlz


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by Farls
    This is amazing the amount of effort you guys are putting into this, i find it all quite interesting though as i guess ye do as well.

    I tried that link there croc and i downloaded 128mb and then just stopped i'm on college connection so dloadin at 1.5mb/s

    Farlz
    !!!!!!:eek: what the hell is going on its 24 kb according to du, weird. I'm putting in this effort for the sake of the knowledge I - unlike The Cor - need to learn things, since the best way to learn is to do......I'm trying to get this to work :p. So far though I'm just confused:D. I wont be able to do anything now the w/e is here SSH is blocked from outside UCD so.....sorry:dunno:.


  • Registered Users Posts: 1,785 ✭✭✭Farls


    Ah don't worry about it sir, the effort you've put into this already is amazing i think. And this thread has thought me more in the past 2 days than i'd learn in a months lectures.

    I'm going to work on the game some more tonight, i programmed it in a kind of procedural way but i have to make it OO now so that will take some time and i have a few UNIX scripts to throw together for an assignment tomorrow then i'll get some of the lecturers here on the case and see what they can do with it on monday.

    making a MIDlet OO is a lot harder than i thought it would be.

    I'm sure you have enough work of your own to be doing this time of the year. i'm just going to try that link again now and leave it downloading to see what excactly it picks up.

    thanx again

    Farlz


  • Registered Users Posts: 1,785 ✭✭✭Farls


    Downloaded that full link there croc and ran it using IE6 to see what it threw up, its around the 160mb mark i think in size, anyway this is what it shows up
    
    <?xml version="1.0" ?> 
      <!DOCTYPE wml (View Source for full doctype...)> 
    - <wml>
    - <head>
      <meta http-equiv="Cache-Control" content="no-cache" /> 
      </head>
    - <card id="init" title="J2ME Downloads" newcontext="false" ordered="true">
    - <do type="options" name="Prev" label="Back" optional="false">
      <prev /> 
      </do>
      <br /> 
      <b>Warning</b> 
      : readdir(): supplied argument is not a valid Directory resource in 
      <b>/home/cs2003/s01bf007/public_html/php/index.php</b> 
      on line 
      <b>32</b> 
      <br /> 
      <br /> 
      <b>Warning</b> 
      : stat failed for (errno=2 - No such file or directory) in 
      <b>/home/cs2003/s01bf007/public_html/php/index.php</b> 
      on line 
      <b>36</b> 
      <br /> 
    - <p align="left">
      <a href="?id=">(0 KB)</a> 
      </p>
      <br /> 
      <b>Warning</b> 
      : readdir(): supplied argument is not a valid Directory resource in 
      <b>/home/cs2003/s01bf007/public_html/php/index.php</b> 
      on line 
      <b>32</b> 
      <br /> 
      <br /> 
      <b>Warning</b> 
      : stat failed for (errno=2 - No such file or directory) in 
      <b>/home/cs2003/s01bf007/public_html/php/index.php</b> 
      on line 
      <b>36</b> 
      <br /> 
    - <p align="left">
      <a href="?id=">(0 KB)</a> 
      </p>
      <br /> 
      <b>Warning</b> 
      : readdir(): supplied argument is not a valid Directory resource in 
      <b>/home/cs2003/s01bf007/public_html/php/index.php</b> 
      on line 
      <b>32</b> 
    
    etc......
    
    
    


    Those warnings over and over again

    Farlz


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by OfflerCrocGod
    I have tried that and it does nothing other then it tries to download the index.php page when i connect using a regular browser
    Had you considered that given it’s outputting WML (even a cursory glance would reveal that) it would be written for a WAP rather than HTML browser?
    It must be brilliant being born knowing everything the rest of the human race can only look on in amazement as you blind us all with your omniscience.
    I wasn’t born knowing everything. I just learned without expecting to be spoon fed. You should try that.
    No right now I'm a little busy with projects so I dont have the time to learn PHP - I was just trying to be helpful; sorry about that.
    Diddums. I got the impression you were looking for help not giving it. As for free time; don’t assume you’re the only person who’s busy on the planet.
    Since I'm on a local network it's very fast and I can get a download of 30+MB of index.php - I cannot figure out why its so large :confused:; thats why I was wondering wheter it was something with the code - I didn't really look at it and I wont have some time until later on today - so if anyone has a clue I'm quite happy to try anything out.
    It’s looping through the content’s of the directory. If you don’t have read permissions to that directory, that loop becomes infinite. And error messages add up...


  • Advertisement
  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Those warnings are about the argument being wrong and the argument should be the jar file MenuScreen.jar. The PHP should be able to find that jar file as it excludes . and .. and the only other file in the dir php is MenuScreen.jar so there may be something wrong with the directory access/reading in PHP of my files....:confused:, right now I'm trying to finish some other guys messed up Java project when I'm finished that I'll see if I can understand what is going on.


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by The Corinthian
    Had you considered that given it’s outputting WML (even a cursory glance would reveal that) it would be written for a WAP rather than HTML browser?
    Why do you think I said "regular" browser?, I was hoping that firefox would see it was dealing with wml and handle it - I dont have an internet enabled phone so I just tried the quickest easiest test.
    I wasn’t born knowing everything. I just learned without expecting to be spoon fed. You should try that.

    Diddums. I got the impression you were looking for help not giving it. As for free time; don’t assume you’re the only person who’s busy on the planet.
    Fair enough but I wasn't going to spend time trying to learn PHP - I was trying to help Farls not you.
    It’s looping through the content’s of the directory. If you don’t have read permissions to that directory, that loop becomes infinite. And error messages add up...
    I kept on meaning to change my umask....but I just haven't bothered yet :o; that sounds like a very likely reason as to why its giving these errors....unfortunately I wont be able to chmod till Monday cause UCD got hacked a couple of years ago and they wont allow SSH connections from outside.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by OfflerCrocGod
    Why do you think I said "regular" browser?, I was hoping that firefox would see it was dealing with wml and handle it - I dont have an internet enabled phone so I just tried the quickest easiest test.
    Regular browsers are generally not equipped to deal with WML content or content-types. When faced with an object with an unknown (to itself) content-type, a Web browser will prompt a file download.

    Even then, had it not occurred to you to download it and then open it with a text editor? Failing that you hardly need an Internet enabled phone to see WAP content - all you need is Google and a little initiative.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by The Corinthian
    Regular browsers are generally not equipped to deal with WML content or content-types. When faced with an object with an unknown (to itself) content-type, a Web browser will prompt a file download.

    Even then, had it not occurred to you to download it and then open it with a text editor? Failing that you hardly need an Internet enabled phone to see WAP content - all you need is Google and a little initiative.


    Actually if you have the Sun J2ME toolkit you can point the emulator at the address.

    Anyway I checked the address and the WML isn't being rendered at all. It seems to be another issue.

    * Edit.. and less of the "I am better then you" comments. :/


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Originally posted by The Corinthian
    Even then, had it not occurred to you to download it and then open it with a text editor? Failing that you hardly need an Internet enabled phone to see WAP content - all you need is Google and a little initiative.
    160mb of errors? - and when I begin the download it doesn't tell you how big the download will be either - the browser doesn't know, it just shows ??? - How was I supposed to know how long the download could go on for!. As Hobbes says using a wap browser gets nothing at all so I just quit that. I'll see if it is a permission problem tommorow :dunno:, hopefully that's it.


Advertisement