bocco Posted September 22, 2008 Share Posted September 22, 2008 Well, i been talking to Killah and i got him to fix the battle tent for me. He did a great job. He told me he been wanting to do that for 2 years now, but no one has ever pushed him to do it. So i figured i would post it for him since it could take him another 2 years. Great code though, i love his work. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Just a small update he forgot to add Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 22, 2008 Share Posted September 22, 2008 Re: Battletent Fix whats with all the spaces? i mean 1 space = 1 byte size extra lol ever tab is 3 bytes whats the point in making the mod bigger by adding all the tabs n spaces? Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Battletent Fix It makes coder more legable. Quote Link to comment Share on other sites More sharing options...
parelem Posted September 22, 2008 Share Posted September 22, 2008 Re: Battletent Fix whats with all the spaces? i mean 1 space = 1 byte size extra lol ever tab is 3 bytes whats the point in making the mod bigger by adding all the tabs n spaces? it's called etiquette of programming, a highly valued skill. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix what is it some trick ya use to make the file look bigger and get more money... Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Zero have you ever heard of some thing called neatness? Well we use our way to make it neat. If i wanted more money hell i wouldnt sell my break in mod for $15 with over 250 lines. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix it's 250 lines because you seem to not fill the lines just add a little script like You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. rather than You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now why exactly do you think something than can be done with one line should be done on 6 lines? Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Everyone has there own way of coding. Please ask nyna why she add's 2 tab space's. You code your way, i code my way, will see who like's what type better.... My way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Your way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Nyna's way (if im correct): You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Oh another thing, Your way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. My way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix actually ill show you some of my new improved coding lol You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. OR You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. compare that to yours: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (that is taken from breakin) your modification Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Break in mod is still part of my old coding... My new way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
parelem Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix what is it some trick ya use to make the file look bigger and get more money... there are, in fact, some languages that error out if you do not indent properly. the idea is to make it legible so when you're working on team based projects the rest of your team can easily find, fix or add things. in a introductory programming course in universities, professors spend a lot of time emphasizing this. when you try to get a job with a big corporation, if you present them with a portfolio full of messy programs, you're not going to get hired. learning the etiquette is just as important as learning the syntax and control flow. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix ^^ Python does, you use tabs instead of brackets Also, it's much easier to debug and read if it's spaced out enough, and indented Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Break in mod is still part of my old coding... My new way: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I agree you are improving killah, but one thing that sticks out all the time when I read your code is efficiency. You seem to have taken a liking to the wildcard (*), it should hardly ever be used, its rarely needed. Optimize your queries, only select the col's you need too. I'm sure your discover the speed improvement it provides, especially during looping. Quote Link to comment Share on other sites More sharing options...
Miniman Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix I'm with Zero if($blah) { echo 'Pooned'; $h->endpage(); exit; } Fair enough the other way is easier to read, But I like it this way :roll: Oh Zero, Shouldn't it be... $sql = sprintf('UPDATE table SET blah=blah+%d WHERE meh = %d', 1,$meh); $db->query($sql); That's the way I'd do it :| Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix * is bad i never use that anymore actually ill show you some of my new improved coding lol You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. OR You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. compare that to yours: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (that is taken from breakin) your modification Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Oh Zero, Shouldn't it be... $sql = sprintf('UPDATE table SET blah=blah+%d WHERE meh = %d', 1,$meh); $db->query($sql); Well %u is used for integers, plus %u wouldn't be needed here, its updating a fixed int... blah + 1, would do it.. Quote Link to comment Share on other sites More sharing options...
Miniman Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix Meh, It's the way I've been doing it on most thing's. :lol: Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix sorry ben didn't understand that are you saying You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. or You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is better ? Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix A quick look at the manual would give you the answer here... %d expects a signed integer %u expects an unsigned integer I generally use %u, as I seldom have to add a negative number - i.e. my queries are written to take into consideration *exactly* the incoming data. Using sprintf in this way is purely a convenience, the %u, (or %d) variables rather nicely convert whatever you have into an integer. With games like MCCodes/DBS, even though the database uses signed integers all over the place (effectively %d's), it's quite acceptable to use %u. For example, with userid's. Just make sure you test out the possible ranges -- MySQL is quite happy with some pretty big numbers, PHP is not quite so good, and sprintf is ... well lets just it works ... most of the time. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 23, 2008 Share Posted September 23, 2008 Re: Battletent Fix so the way i do it is fine then Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 29, 2008 Share Posted September 29, 2008 Re: Battletent Fix wait..one sec... this fix dont work -.-" you may continue arguing Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 30, 2008 Share Posted September 30, 2008 Re: Battletent Fix Bocco must update the first post, it does work correctly if u seperate the mysql_fetch_assoc and the mysql_query. Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 30, 2008 Share Posted September 30, 2008 Re: Battletent Fix oh well, ive removed the battle tent anyway :-) Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 30, 2008 Share Posted September 30, 2008 Re: Battletent Fix i remove battle tent immediately i hate it Quote Link to comment Share on other sites More sharing options...
Uridium Posted September 30, 2008 Share Posted September 30, 2008 Re: Battletent Fix I never really saw the point in the BattleTent script. You beat up a low level NPC hmm ok then you get your ass whooped by a player thats even lower than the NPC so i couldt see the point to it. Quote Link to comment Share on other sites More sharing options...
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.