Jump to content
Eternal Lands Official Forums

Aerowind

Members
  • Content count

    1606
  • Joined

  • Last visited

Posts posted by Aerowind


  1. I figured out what I needed to figure out, I guess it was hard to explain what I wanted. I'm all set now, I just used $_POST to get what was in the name of the form field of both image and flash and then used basename().


  2. Hmm,

    a.) escape string array indices (see "Array do's and don'ts" in the Arrays manual entry).

    b.) check with the manual for handling file uploads (sorry for this, but can't assume you did everything right since you're having a problem :D, maybe forgot MAX_FILE_SIZE or set a wrong enctype in the form :wub:).

    c.) check if $_FILES['image']['error'] is 0 (file upload error messages), same for $_FILES['flash']['error'].

    d.) I'd be careful with move_uploaded_file and a relative path, uploads will (most likely) go to the server's tmp directory (probably /tmp), so "../uploads/" is "/uploads" instead of "/var/www/uploads/" or wherever you want it to go ;)

     

    My problem is that all the guides for uploading files that are connected to databases are the files are getting uploaded to the database, sure, I want the file uploaded but I just need the name of the file stored in the database and nothing else. So MAX_FILE_SIZE, shouldn't be important, and it doesn't seem like I'd have to physically upload the file for it to retrieve the name (yet). Which is what I'm curious about.


  3. Alright, well I decided to make the quick fix and MANUALLY create the database which is not what I was aiming for, because I wanted PHP to behave and work. So it works, and now I want to upload files (image specifically) and submit the name of the file to a database so I can later retrieve that and embed it into the site. Any ideas? I mean I guess I could always have me/other admins of the site manually enter that information but that would create more work that I don't want to do later on, so I just want this all working now.

     

    I'm assuming it'll be something to do with

    move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
       "../uploads/{$_FILES['uploadFile'] ['name']}")

     

    EDIT: I might think I have it figured out, but then again I might not, I'll tell you when I test it.

     

    EDIT: It did not work. Here's what I have

    $image = $_FILES[image];
    $imagename = $image[name];
    $flash = $_FILES[flash];
    $flashname = $flash[name];
    
    echo $imagename;
    echo $flashname;
    $sql="INSERT INTO $dbgame (GameName, ImageName, FlashFileName, Description) VALUES ('$_POST[gamename]','$imagename','$flashname','$_POST[description]')";
    if(!mysql_query($sql))
    {
    echo 'Error: ' . mysql_error();
    }
    

    It submits, Game Name, and Description, but just puts in blank values for Image Name and Flash File Name. Help?


  4. So, I'm trying to revive my site House of Pwn, and I'm trying to get everything database based.

    But I keep getting this error. Can anyone help?

     

    $dbuname and $dbserver are not the actual values

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user '$dbuname'@'$dbserver' (using password: YES) in /home/houseofp/public_html/admin/header.inc on line 12

    I cannot connect to the database because: Access denied for user '$dbuname'@'$dbserver' (using password: YES)

     

    Here's the block of code causing the issue.

    Line 12 -> $dbh = mysql_connect($dbserver, $dbuname, $dbupass) or die ('I cannot connect to the database because: ' . mysql_error());
    //Create Database, if it doesn't exist
    $sql = "CREATE DATABASE IF NOT EXISTS $dbname";
    mysql_query($sql);
    echo 'Error: ' . mysql_error();
    mysql_select_db($dbname);
    


  5. I guess this can be generalized as post your graffiti here and where you saw it at (not necessarily yours, but cool graffiti you saw).

     

    At MSU (Michigan State), a bus stop on the ground resided:

    0428071743.jpg


  6. You can make a pretty damn simplistic MySQL database, in the end, that is. Sure, the basic coding for the database will be time consuming but I'm sure there are many people to volunteer to do something of that sort (I can be of some help).


  7. Inside Iscarlith Storage Cavern there's a chunk of wall you can walk through.

     

    I can sit inside the wall in a variety of places (and it cuts down like a second of walking time because you don't have to walk around the thing). A coordinate inside the wall is [589,667]

     

    Here's a screenshot Iscarlith Storage Cavern map bug

     

     

    [FIXED, was reported earlier]


  8. I have also noticed this. Once I heard the 100% chance thing I decided to finish the 20k project figuring I could get a few EFE's wait until the rate went down and then sell 'em. Anyways, before the change of everything I got about 1 after 2.5k and then I quit after I had made ~5k.

     

    I've now made ~13.3k and I haven't made a single one yet.

     

    EDIT: Yep, 14.5k FE and not one EFE.


  9. Alright, well in the case that they will be quite visible never mind I guess? Though I still like the direction idea, it would make some slight use of the compass.

     

    But if it's double click action to fire an arrow will it there be a chance to move out of the arrow's way? I don't think their should be personally, once you get that second click off it should be (Oh, I'm getting hit...) Unless maybe you TPTR or use a ring?


  10. Everyone most remember Ent and Roja have to make a living off this game, so if they feel a desire or need to sell something in the shop, then so be it.

     

    Secondly, just because you don't like to admit it, but if you look at it from a perspective. They're better than you. Like it or not, they somehow got to that position in society, they're better than you, and they deserve those rights. So everyone can stop bitching of whether they'll be sold in shops or not. You do have to remember it's only ONE pickpoint, and unless you have like 80+ OA or something, getting back up there isn't entirely difficult.

     

    Get it? Got it? Good. Now stfu, and let Ent go about his life.


  11. (though maybe display a "Your getting attacked by ****" message?)
    nonono. then you spoil the fun of a sniper with a really high perception and a good distance :P

    if they're close enough to see easily, then who's attacking you would work. otherwise a direction (in both cases, a perception (and maybe direction facing) check could be done to see if you'd be able to tell where it came from)

     

    Heh, that's why I phrased it as a question. Though it would be cool if perhaps your out of range of their site and all it says is "Your being attacked from the North-west" or something. Makes better use of the compass :)


  12. The thing with having to click twice compared to as say a cooldown fire rate is the fact that on first hand experience I've had to spend 10 seconds chasing down a target to initiate combat. Sometimes those damned things just don't sit still.

     

    To balance it a little bit more you could have:

    Click once - check if in range (If not, display a Get closer message or whatever)

    Animation of drawing and nocking the area

    Recheck the distance (say the animation takes 1 second). That gives a second for the intended target to move off screen, or out of range. Then let a 7 second cooldown initiate.

     

    To determine whether they initiate or flee could be whether they ignore you or not. Non-aggressive creatures would just kind of walk around as usual. (Maybe have bears and stronger initiate?). And if it's for PK, the player themselves have to go for whatever they're going for. An arrow is just added damage (though maybe display a "Your getting attacked by ****" message?)

     

    Though what if an object like a hedge maze is in your way? It's not logical for you not to be able to shoot the arrow because it's a hedge maze, but I would think that would present some problems to the server, no?

×