
The Ace
Members-
Posts
363 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by The Ace
-
Re: SQL Queries Uh...no, not really. In my users table, I have userid, etc, then bankcrystal2. But I have a crystalbank2 which I use, but I don't use bankcrystal2. And I want to delete that field from the users table. Would the query be: ALTER TABLE `users` DROP INDEX `bankcrystal2`
-
I am trying to delete a row from my database. I have tried SO many things to delete this row from my users table, but I keep getting this error: Error SQL query: DELETE FROM users WHERE Field = 'bankcrystal2' MySQL said: Documentation #1054 - Unknown column 'Field' in 'where clause' Do I need to add ' to users, like 'users' I am using http://www.w3schools.com/sql/sql_delete.asp to help, but I can't seem to get it to delete...any help you can give me? I am trying to do things myself to learn, but I just can't seem to delete it... :(
-
Re: [v1]Attack Stats FREE[v1] Thanks for this mod! +1! Works fine for me now! :-P
-
Re: Counting (nr game) 1835 :-P
-
Re: [v1]Attack Stats FREE[v1] Whereabouts do I add the code in the files?
-
Re: Large Number.... Thanks, but now my estate looks like this: file attached!
-
Re: Large Number.... I have got the updated version of the estate agents, but I have the same problem, but with just the will. I can't seem to get it to work, to show the whole number. Here is my new estate.php code: <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((float) $_GET['property']); if($_GET['property']) { $mpq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($mpq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; print "[url='estate.php?sellhouse']Sell Your House[/url] "; if($ir['willmax'] > 100) { } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <table cellspacing=2 class='table'><tr style='background:gray;'><th>House</th><th>House Price</th><th>House Will</th><th>Buy?</th></tr>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC",$c); while($r=$db->fetch_row($hq)) { print "<tr><td>{$r['hNAME']}</a></td><td>£$t".money_formatter($r['hPRICE'],'')."</td> <td>{$r['hWILL']}</td> <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; } } $h->endpage(); ?>
-
Re: Decimals in Banks I will be resetting my game, and I would like the decimals out of banks and money on hand....and I am not sure about the floor function...I am confuzzled! :?
-
Re: [v2] Stafflist enhanced [v2] Any screenshots? I would like to see what it looks like, before I use it! lol.
-
Re: New Crime.... That query worked...so I'm alright now....thanks AlabamaHit! :)
-
Re: New Crime.... But would would I put into the query? EDIT: would it be something like this: ALTER TABLE `crimes` ADD `crimeSUCCESSRUBY` INT( 11 ) NOT NULL DEFAULT '0';
-
Re: Link.... Agh! Crap....I just spotted the error! This topic can be deleted! Sorry! :)
-
I have added the Ruby Trader into my game and added the link to my explore.php, but when I'm in IE, it is not a link, just text, but when in FireFox, it is a link....anyone know why this could be? (And if it's any help, I have V2).
-
I have successfully installed the Ruby Trader....so, I am trying to make my crimes give Rubys. I can enter the amount of rubys for succeeding at the crime, but whenever I push submit, it comes up with: QUERY ERROR: Unknown column 'crimeSUCCESSRUBY' in 'field list' Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSRUBY, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'test', '100', '((WILL*0.8)/2.5)+(LEVEL/4)', '1000000', 1000, 100, 0, '6', 'tetet', 'tetehh', 'khsjf', 'jhfsjf', 10, 'hfhf', 10) Does this mean I have to add the Success Rubys bit to my database? But, what would the query be!? :( EDIT: I have V2! :)
-
Re: Ruby Trader Mod FREE!!! V2 It did work...lol...thanks! :)
-
mccode-v1 Steal Crystals when you Mug someone...
The Ace replied to tranz_fusion's topic in Free Modifications
Re: [mccode] Steal Crystals when you Mug someone... I know this topic hasn't had a reply for a long time, but I would like this feature in my game. Now, I know this was tested with the Lite Version....but is there one for V2? Cheers, The Ace -
Re: Horse Racing[v1 + v2] Where could I double check it, to see if it exists? lol. :)
-
Re: Ruby Trader Mod FREE!!! V2 Is that the query for V2 as well? (Meesa noob, sorry). :-P
-
Re: Horse Racing[v1 + v2] Thanks again, but I got the same problem, with a damn query error! Here is the query error: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid=1' at line 1 Query was UPDATE users SET money=money-12500, crystals=crystals- WHERE userid=1 Here is my code: <?php /****************************** >CREATED BY oxidation >NOT FOR RE SALE FREE MOD ONLY >COPYRIGHT 2008 ******************************/ include("globals.php"); if($ir['level']< 5) { print "You need to be at least level 5 to access Horse Racing Department."; $h->endpage(); exit; } print "<h3>Horse Racing Department</h3> "; if( !$_POST['tixs'] ) { print "Want to make a bet of winning a high amount of crystals? [b]Each ticket costs 1 crystal and £2,500. You may choose which horse you would like to bet on. If you win, you will recieve the winning prize of...you'll just have to find out!![/b] <form action='horseracing.php' method='post'> <input type='hidden' name='conf' value='yes'> Tickets : <input type='text' name='tixs' value='0'> Horse : <select name='horse'> <option value='1'>Lucy</option> <option value='2'>Thornton</option> <option value='3'>Black Knight</option> <option value='4'>Cross Eyed Grudge</option> <option value='5'>Samantha</option> <option value='6'>Elroid</option> <option value='7'>Lulu</option> <option value='8'>Hallistrom</option> <option value='9'>Skull Warrior</option> <option value='10'>West Style</option> </select> <input type='submit' value='Bet'> </form>"; } else { $_POST['tixs'] = abs(@intval($_POST['tixs'])); $rand=(int) rand(1,100); $money=$_POST['tixs']*2500; $cryst=$_POST['tixs']*1; $wincas=5000*$_POST['tixs']; $wincry=10*$_POST['tixs']; if($_POST['tixs'] < 0) { die("ABUSER!"); } if($ir['money'] < $money || $ir['crystals'] < $crystals) { print "You do not have the right amount of cash/crystals to bet on your horse."; $h->endpage(); exit; } if($rand == $_POST['horse']) { print "Congratulations! You won the winning prize. You have now been credited. "; $db->query("UPDATE users SET money=money+$wincas, crystals=crystals+$wincry WHERE userid=$userid",$c); $usq=$db->query("SELECT userid FROM users",$c); $r=$db->fetch_row($usq); } else { print "You did not win the winning prize, bad luck. [url='horseracing.php']Back to the department[/url] [url='explore.php']Explore[/url] "; $db->query("UPDATE users SET money=money-$money, crystals=crystals-$crystals WHERE userid=$userid",$c); } } $h->endpage(); ?> Can anyone spot the error/s? :)
-
Re: Horse Racing[v1 + v2] Thanks killah. But whenever I buy a ticket, it doesn't take the money or crystals... :(
-
Re: Lucky Boxes How would I add a query to my phpMyAdmin in the USERS part for Super Lucky Boxes.... I know it has got something to do with "super_boxes TINYINT(3) UNSIGNED NOT NULL DEFAULT 3", as Nyna said, but what goes before that...? Something ALTER....?
-
Re: Horse Racing[v1 + v2] This is for V1, isn't it? How would I make it slightly (lol) secure for V2?
-
Re: Horse Racing[v1 + v2] Oh...um, to make it cost 0 crystals, would I change $cryst=$_POST['tixs']*50; to $cryst=$_POST['tixs']*0;
-
Re: Horse Racing[v1 + v2] Well, I just changed the 1,100 to 1,10. Makes it a bit easier....might make it 1,15 though! lol :) It is a great mod! :-P
-
Re: Horse Racing[v1 + v2] Thanks. I have done that...lol....cheers! :)