Jump to content
xisto Community

pyost

Members
  • Content Count

    1,210
  • Joined

  • Last visited

Everything posted by pyost

  1. Did you change the domain's nameservers to point to ns.computinghost.com and ns2.computinghost.com? If you didn't - well, do so If you, however, did, you need to wait up to 48 hours for the changes to take effect.
  2. I believe the right name servers for everyone hosted at one of Xisto's services are ns.computinghost.com and ns2.computinghost.com - but I'll have to check that.
  3. I had to deal with similar issue (reinstalling Windows XP with Ubuntu 7.10 already installed), except I didn't delete the Windows partition, just formated. The thing is, at least according to my limited "boot" knowledge, that you have probably made the old GRUB unusable, since the Windows practically isn't on the same partition any more. This, however, shouldn't prevent you from trying the method I used. Be aware that I have done this only once, so there is a slight risk when following my instructions. First of all, insert the Ubuntu Live CD and boot the computer from it. After doing so, and starting Ubuntu, run the Terminal (Applications -> Accessories -> Terminal) and run the following commands. CONSOLE $ sudo grub After doing so, you will start the GRUB configuration utility which will allow you to setup GRUB on a desired partition. CONSOLE grub> find /boot/grub/stage1 This command will output (hd*,*), the asterisks being some numbers. Now you need to run these commands (replacing the asterisks with the numbers you got): CONSOLE grub> root (hd*,*)grub> setup (hd0) grub> quit Exit Ubuntu, remove the disk and reboot your computer. You should now get the GRUB bootloader. The chances are Ubuntu will run properly, but due to the deletion of a partition, Windows might not. If that is the case, start Ubuntu and run this command in the terminal: CONSOLE $ gksu gedit /boot/grub/menu.lst The file menu.lst should contain something like this: # This entry automatically added by the Debian installer for a non-linux OS# on /dev/sda1title Microsoft Windows XP Home Editionroot (hd0,0)savedefaultmakeactivechainloader +1 If Windows doesn't boot, the root line is wrong, and you need to replace (hd0,0) with the proper partition. Which one and how to do so? That I don't know...
  4. Each line must have a greater value than the previous one, so we just need to use the formula until the value becomes K, or exceeds it. value = acounter = 0while (value < k) value = calculate(value, a) counter = counter + 1if (value == k) return counterelse return -1 "calculate" whould be the function you use to calculate result of the # operator. This is quite easy to achieve, as you can take out the digits from a number by using "% 10 (mod 10)", which gives you the remainder when dividing by 10 (the last digit).
  5. mysql_query doesn't return an exact value, but a resource ID. You need to use mysql_result in order to extract the desired data from a resource ID.
  6. Are you perhaps using a free domain service such as *.tk? Because they tend to add code to pages in order to insure you aren't avoiding advertisements or something like that.
  7. Over here: http://www.webpagepublicity.com/free-fonts-v2.html
  8. Just convert both $user['to_user'] and $userfinal to lowercase with the strtolower() function
  9. You can also do this with the use of the File Manager in cPanel only. First of all, zip (or rar, or tar.gz) all the files you want to upload, and then upload the file to the desired location in File Manager. After you do so, select the archive and you should get an option similar to "Unpack" - this will take out all the files from the archive and put them into the same folder.This way not only will you upload many files at once, but they will also be compressed, therefore speeding up the process
  10. I like this one Though I would suggest being gentle with keyboards, they aren't as good as the used to be. I had a Cherry keyboard for years (at least) and it function almost perfectly - the left shift button got stuck due to overuse, that's all. It still work, but now I use a slim Genius keyboard which has survived lemonade entering every part I usually just flip the keyboard every now and then, and then remove the food and dirt that fall out
  11. Why not "If the user exp is more than 100, the user level should be changed to level 2, and the user should get skill points (etc.).."?
  12. You have a script that increases a player's level if a condition is fulfilled, right? So why not just increase the points at the sime time you increase his/hers level?
  13. pyost

    Login Script

    If the MySQL query is valid, and returns one row, this should work: echo $char['bike'] . ' is your bike';
  14. pyost

    Login Script

    <?session_start();if(!session_is_registered(myusername)){header("location:main_login.php");}else{$host="localhost"; // Host name$username="eggie_asa"; // Mysql username$password="asa"; // Mysql password$db_name="eggie_asa"; // Database name$tbl_name="members"; // Table name// Connect to server and select databse.mysql_connect($host, $username, $password)or die("cannot connect");mysql_select_db($db_name)or die("cannot select DB");$result = mysql_query("select * from `char` where `user` = '$myusername'");$char = mysql_fetch_array($result);echo $char['bike'];?><html><body>Login Successful</body></html>} Try this.
  15. Did your lap top come with a pre-installed version of Windows? If it didn't, and you installed it yourself, you might be lacking some motherboard drivers, though I can't see this being a problem in XP
  16. I am getting really confused... Sorry, but I can't help you anymore tonight, as I have some things to do. I'll see to this problem tomorrow
  17. Well, it was nice making such a stupid mistake... mysql_query doesn't return the exact value, but a resource, which you cannot use just like that. So try this code: <?phpsession_start();include "database.php";include "hptime.php";include "level.php";$nuser=mysql_real_escape_string($_SESSION['user']);$auser=mysql_real_escape_string($_SESSION['admin']);if($nuser){$userfinal=$nuser;}elseif($auser){$userfinal=$auser;}#################################################################// TID$updatedR = mysql_query("SELECT hptime FROM characters WHERE user='$userfinal'"); //hämta förra tiden från databasen$updated = mysql_result($updatedR, 0, 'hptime');$currentTime =time(); //tiden just nu$difference = $currentTime - $updated;// HP$healthR = mysql_query("SELECT temphealth FROM characters WHERE user='$userfinal'");//hp, etc. kan du nog fixa från annat värde som du hämtat.$health = mysql_result($healthR, 0, 'temphealth');// HEAL$addHealth = floor($difference / 2); // we need to know how many hours have passed - we get an round value (though it is a "float" number) by using floor()$addHealth = (int) $addHealth * 5; // this is how much health will be added, if you add 5HP per hour - I'm not sure whether (int) is necessary, but better safe than sory$health += $addHealth;if ($health > $user['maxhp']) { $health = $user['maxhp']; } // we don't want the health to go over max hp!$updated = time(); // we also need to update the alteration time.mysql_query("UPDATE characters SET temphealth='$health' AND hptime='$updated' WHERE user='$userfinal'"); //Uppdatera HP och TIME?>
  18. Try this: <?phpsession_start();include "database.php";include "hptime.php";include "level.php";$nuser=mysql_real_escape_string($_SESSION['user']);$auser=mysql_real_escape_string($_SESSION['admin']);if($nuser){$userfinal=$nuser;}elseif($auser){$userfinal=$auser;}#################################################################// TID$updated = mysql_query("SELECT hptime FROM characters WHERE user='$userfinal'"); //hämta fÜrra tiden frün databasen$currentTime =time(); //tiden just nu$difference = $currentTime - $updated;// HP$health = mysql_query("SELECT temphealth FROM characters WHERE user='$userfinal'");//hp, etc. kan du nog fixa frün annat värde som du hämtat.// HEAL$addHealth = floor($difference / 2); // we need to know how many hours have passed - we get an round value (though it is a "float" number) by using floor()$addHealth = (int) $addHealth * 5; // this is how much health will be added, if you add 5HP per hour - I'm not sure whether (int) is necessary, but better safe than sory$health += $addHealth;if ($health > $user['maxhp']) { $health = $user['maxhp']; } // we don't want the health to go over max hp!$updated = time(); // we also need to update the alteration time.mysql_query("UPDATE characters SET temphealth='$health' AND hptime='$updated' WHERE user='$userfinal'"); //Uppdatera HP och TIME?> It should work if you are dealing with the right fields in the database - the script will add 5 health for every two seconds that have passed. If it still doesn't work, it would be a good idea to echo all the variables before and after altering them, so you can see what happens.
  19. I think it's 2 grands => two thousands, but I can't be sure not being a native speaker and all...
  20. This is a great tool! I was looking for a simple program that would be able to split and merge PDF files, and bumped into this after half an hour of searching (that was 2-3 months ago) - since then I didn't feel the need to find a better program. What's more, it can also run on Linux, to which I switched a month ago, so it made things quite easier Definitely worth trying if you don't need any fancy options for splitting and merging, just the basic ones.
  21. Exactly And after the calculation you use the same variables in an INSERT MySQL query.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.