Blade Maker Posted October 31, 2010 Posted October 31, 2010 This is a very simple mod I thought of making. Put this code near the top of globals.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I believe I did this right, but I just made it up as I thought of it. Enjoy this basic mod. Fixed... Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 This is a very simple mod I thought of making. Put this code near the top of globals.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I believe I did this right, but I just made it up as I thought of it. Enjoy this basic mod. i don't think you get how to use mysql_real_escape_string i also think you need to look over your queries "$db->query()" look at php.net again. you may also wish to use the event_add() function for mcc and not just echo it out? still not a bad idea Quote
rulerofzu Posted October 31, 2010 Posted October 31, 2010 Nope its not fixed. Clearly you just read Dom's reply and didnt read what you was supposed to do. event add does not and will not work. Go read the code for the function and then try it again. you will also need to call the db class for your queries to work. For someone that has been on here for a few months you still have learned very little. Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 Nope its not fixed. Clearly you just read Dom's reply and didnt read what you was supposed to do. event add does not and will not work. Go read the code for the function and then try it again. you will also need to call the db class for your queries to work. For someone that has been on here for a few months you still have learned very little. that's a bit harsh. I think it's going to be put in a file anyway (as it not be on it's own) so the class file would be there as would global_func for the event_add() . I also think he just started with mcc, however i am not sure there. @blade - he is right event_add() is wrong "event_add($userid, $text)" . Quote
Djkanna Posted October 31, 2010 Posted October 31, 2010 Nope its not fixed. Clearly you just read Dom's reply and didnt read what you was supposed to do. event add does not and will not work. Go read the code for the function and then try it again. you will also need to call the db class for your queries to work. For someone that has been on here for a few months you still have learned very little. that's a bit harsh. I think it's going to be put in a file anyway (as it not be on it's own) so the class file would be there as would global_func for the event_add() . I also think he just started with mcc, however i am not sure there. @blade - he is right event_add() is wrong "event_add($userid, $text)" . That's not harsh to be fair, it's the truth. :) You've either got a stray else in there or the mod is missing a piece. Quote
rulerofzu Posted October 31, 2010 Posted October 31, 2010 Its not harsh its a wake up call. Taking into account he will code mods for money as stated in one of his other posts when clearly he cannot code. Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 Its not harsh its a wake up call. Taking into account he will code mods for money as stated in one of his other posts when clearly he cannot code. ok so sorry blade you're not ready for paid work, however zu he is having ago how many people on here just ask for everything free and never try? Quote
Curt Posted October 31, 2010 Posted October 31, 2010 take a look at line 17 ;) EDIT: you fixed line 17...lol One other thing i see is the else case on the bottom...besides that the mod should work fine... Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 it's a big improvement over the 1st post i looked at. $randomevent = (rand(1,600)); you don't need the () around the rand - $randomevent = rand(1,600); SET money=money+'5000' you also don't need the ' ' around a number, however as i said looking better :) ^^^ none of that would stop the mod working ;) Quote
Blade Maker Posted November 1, 2010 Author Posted November 1, 2010 Okay thanks for all the tips! Quote
The Monk Posted November 1, 2010 Posted November 1, 2010 Personally dominion, I thought putting ' ' around numbers in queries and ` ` around table/column references was a good habit. I might have just developed that thought from MCCodes but I don't know... Quote
Jordan Palmer Posted November 1, 2010 Posted November 1, 2010 I've never quoted numbers in queries nor would I suggest doing it, Quoting table name's is good EXAMPLE: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dominion Posted November 1, 2010 Posted November 1, 2010 i would not say it's a good habit in fact it's one i had to stop, however it does not hurt. as for the `` yes use it :P Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.