gurpreet Posted December 17, 2008 Share Posted December 17, 2008 Ok so I'm a noob at coding, but I'm tryna get better, please correct my errors and tell me what they are. I'm trying to make it so people can't attack level 1's. I know this is basics for most of you, but you must have gone through this. else if($odata['level'] ==1) { print "<center><font size=5>You cannot attack a level 1 as they won't be able to do much back to you.</font></center>"; $h->endpage(); exit; } I used the $oadata as Alabamahit said $ir is for you, and $oadata is for them. Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted December 17, 2008 Share Posted December 17, 2008 Re: No attacking level 1 did you try it? Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted December 17, 2008 Share Posted December 17, 2008 Re: No attacking level 1 i use a 3 day rule... if the user is less than 3 days old they cannot be attacked Quote Link to comment Share on other sites More sharing options...
gurpreet Posted December 18, 2008 Author Share Posted December 18, 2008 Re: No attacking level 1 Oh wow I can code something... :mrgreen: How would the <3 days thing work? else if($odata['daysold'] <3) { print "<center><font size=5>You cannot attack someone who has been playing Game Name for less than 3 days as they won't be able to do much back to you.</font></center>"; $h->endpage(); exit; } Also just wondering, as i took a guess, the 'daysold 'level' and stuff, is that a column in the Mysql DB? Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted December 18, 2008 Share Posted December 18, 2008 Re: No attacking level 1 I understand your learning. Instead of asking will this work... Try it...that looks right to me. But the best way to learn is put the code in see what it does. don't ask if it will work. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted December 18, 2008 Author Share Posted December 18, 2008 Re: No attacking level 1 I'm asking if the 'level' and 'fedjail' and stuff are columns in the mysqlDB? Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted December 18, 2008 Share Posted December 18, 2008 Re: No attacking level 1 open phpmyadmin and look, lol.......... But yes they are.. Quote Link to comment Share on other sites More sharing options...
POG1 Posted December 18, 2008 Share Posted December 18, 2008 Re: No attacking level 1 I'm asking if the 'level' and 'fedjail' and stuff are columns in the mysqlDB? yeah they are, somewhere there will a query that selects the record of the player your attacking and turns into an array. Quote Link to comment Share on other sites More sharing options...
Undergroundcity Posted December 21, 2008 Share Posted December 21, 2008 Re: No attacking level 1 i use a 3 day rule... if the user is less than 3 days old they cannot be attacked I do too. Alot of people are level 1 and don't even play. Quote Link to comment Share on other sites More sharing options...
POG1 Posted December 21, 2008 Share Posted December 21, 2008 Re: No attacking level 1 some people would stay level 1 on purpose tough, the 3 day idea is better. Or a better idea; You can not be attacked for 7 days (safety) and if you attack someone before 7 days you loose safety.. Quote Link to comment Share on other sites More sharing options...
redsnake420 Posted December 22, 2008 Share Posted December 22, 2008 Re: No attacking level 1 i like pog1 safety idea the best lol hook it up all the ways are good +1 for everyone Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted December 22, 2008 Share Posted December 22, 2008 Re: No attacking level 1 else if($odata['daysold'] < 7) { echo('<center>[b]You cannot attack someone who has been playing Game Name for less than 7 days as they won't be able to do much back to you.[/b]</center>'); $h->endpage(); exit; } not really that difficult to take it from gurpreet's post... 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.