1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

ajax/php headace

Discussion in 'General Chat' started by Jester, May 5, 2009.

  1. Jester

    Jester Junior Member

    Joined:
    May 3, 2009
    Messages:
    20
    ok the story so far,
    I'm building an mmorpg, text based and my old version was a olid php, which had its issues but worked all well and good, my friend told me about ajax which is new to me so im giving it a go, but i seam to be running into some troubles with my movement code, any one here lend a hand (i no this isnt a webdevelopemnt forum but thought id trow it up)

    ok the move button snipit is in a file called game.php as follows:
    <input type="button" value="North" onclick="moveNorth();

    then this function is:
    function moveNorth(){
    directionMove = "North";
    data = "directionMove=" + directionMove;
    evalpostAJAXHtml("move.php",data,0);
    }

    and the move.php files is:
    <?php

    $direction = $_POST['directionMove'];
    if($direction == "North")
    {
    $posx = $posx + 1;
    if($posx > "10")
    {
    $posx = "1";
    echo"done";
    }
    ?>

    the .js scrpit is writen in the head of game.php as follows:
    <script src="gamefunctions.js" type="text/javascript </script>

    my error is that 'null' is null or not an object..... but i havent got a clue whats wrong :s
     
  2. BeeCeeBee

    BeeCeeBee ADMINISTRATOR IN MEMORY

    Joined:
    Apr 20, 2009
    Messages:
    7,201
    Location:
    New Jersey "Stronger than the Storm"
    Operating System:
    Windows 7
    Hi Jester,

    As match said at the end of your other post, you have accented the need for us to expand our forum categories and over the next days and weeks you will see that happen.

    As for your issue, we do have people who may be able to help out but they are well into their beds at the moment.
     
  3. Jester

    Jester Junior Member

    Joined:
    May 3, 2009
    Messages:
    20
    sounds good, I'm just searching the net and playing with the code, got the errors sorted out but no the button doesnt do... anything lol, *smacks google* if i can just find the right search result lol
     
  4. BeeCeeBee

    BeeCeeBee ADMINISTRATOR IN MEMORY

    Joined:
    Apr 20, 2009
    Messages:
    7,201
    Location:
    New Jersey "Stronger than the Storm"
    Operating System:
    Windows 7
    Keeping in mind that I haven't a clue what you are talking about, :eek: , BSschwaz is an expert in code I believe and help4me is a web designer. I believe that one or both may be able to help you. They are both located in the US Central Time Zone where it is about 3:30 AM as I write so keep in touch.
     
  5. Jester

    Jester Junior Member

    Joined:
    May 3, 2009
    Messages:
    20
    Well im uk time and just got up lol, think im on all day today playing about with a few things, will just keep poping back and froth :)

    can i just say this forum is probably one of the most helpfull i been on yet (and trust me I have been on a LOT latley lol) so just wana thank you and the team on a job well done :)

    over and out for a few hours.
     
  6. DirtyPolo

    DirtyPolo Inactive Staff Member

    Joined:
    Apr 25, 2009
    Messages:
    640
    Operating System:
    Windows 10
    Hey Jester, unfortunatly I focus my coding in software, with Java/VB.NET/C as my main languages. Don't be fooled, I'm not advanced enough to ask technical question on them yet! :D

    I'm better at doing, than explaining! :D
     

Share This Page