Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho …+ (AY - Player.PosY) / Tan(RayRadians) StepY = ObjectSize ElseIf ((RayRadians = 0 And RayRadians = PI)) Then AY = Player.PosY… = False Set A = Nothing Set s = Nothing End ElseIf (KeyCode = vbKeyLeft) Then Player.Radians = Player.Radians - … Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho … = False Set A = Nothing Set s = Nothing End ElseIf (KeyCode = vbKeyLeft) Then Player.Radians = Player.Radians - …Radians) * Speed Player.MoveY = Sin(Player.Radians) * Speed ElseIf (KeyCode = vbKeyRight) Then Player.Radians = Player.Radians + Radians… VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho … = Player.PosX + (AY - Player.PosY) / Tan(Player.Radians) StepY = ObjectSize ElseIf ((Player.Radians = 0 And Player.Radians = PI)) Then AY = Player… = Player.PosY + (Player.PosX - AX) * Tan(Player.Radians) StepX = ObjectSize ElseIf ((Player.Radians = PI / 2 Or Player.Radians = 3 * PI / 2… Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by rproffitt For VertDist I would set a break on line 104 so I could examine the values in line 103. Also, could be a localization issue that the comma is used for the decimal point and the integer of the results might be 35 and 4548. Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho finally i found the problem is on these line: HorizDist = Sqr(((HorizX - Player.PosX) * (HorizX - Player.PosX)) + ((HorizY - Player.PosY) * (HorizY - Player.PosY))) 'works fine VertDist = Sqr(((VertX - Player.PosX)) * ((VertX - Player.PosX))) + (((VertY - Player.PosY)) * ((VertY - Player.PosY)))'calculation incorrect like … Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho not so easy :( WallDistance = WallDistance * Cos(Abs(RayRadians - Player.Radians)) 'avoiding the Fish Effect RayHeight = (ObjectSize / WallDistance) * 200 '320 is the width screen If (RayHeight > 200) Then RayHeight = 200 A.ForeColor vbBlue A.DrawLine 475 + 50 + RayCounts, 200 / 2 - … Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho after several tests i fix it: Do While RayCounts < RayCount If (RayRadians > (2 * PI)) Then RayRadians = 0.001 i have more to update: 1 - win more performance\FPS; 2 - and trying avoid the 'on error resume next'(it's about the array dimensions): Private Sub DrawRays2() Dim AY As Double… Re: else if OR elseif ? Programming Web Development by decade "elseif" and "else if" are has the same output. Re: Display groupbox based on inputbox number Programming Software Development by ddanbe `ElseIf IsNumeric(iNumber = 2) Then` Is `iNumber` always 2? The first time it is 1. Re: help me w/ my codes Programming Software Development by anonimous elseif for moby and honey doesnt work :( Re: Calculation problems. Programming Software Development by Minimalist ElseIf checks < 39 Then This doesn't give you the range 20 -38 but th range 0-38 Re: Web Browser Help Programming Software Development by Sahil89 > ElseIf (AddressBar.Text <> "" And "." And "") Then You will have to write it like this `ElseIf (AddressBar.Text <> "" And AddressBar.Text <> ".") Then` you were comparing string only once. Re: can someone help me why there's error on mine if else statement? Programming Web Development by buddylee17 …"><!---Notice how there is a statement after elseif. You can't just use <cfelseif>---> &…"> </cfif> [/code] Honestly, you have two elseif statements that do the exact same thing. In that case… could just use else and get rid of the second elseif: [code=Coldfusion] <cfset today = NOW()> <cfif … Re: isset session check before content delivery Programming Web Development by diafol } elseif(isset($_GET["city_id"]) && $_GET["city_id&… using an IDE that can highlight errors on the fly. } elseif(isset($_GET["city_id"]) && $_GET["city_id… Re: Define() Constant inside mysql connection string probelm Programming Web Development by diafol elseif($accountid_var =="744821" || $club_id =="744821" )//-------" echo &… elseif 2d array test Programming Web Development by WarrenG.27 …array_cont_val[1][3] == $array_cont_val[1][2]){ $x = "wins"; } elseif ($array_cont_val[2][1] == $array_cont_val[2][2] && $array_cont_val[2…[3][3] == $array_cont_val[2][3]){ $x = "wins"; }elseif{($array_cont_val[1][1] == $array_cont_val[2][2] && $array_cont_val[3… elseif not working Programming Web Development by timwhelan … this block to show up on the info sessions page. elseif ($_SERVER["REQUEST_URI"], 0, 13) == '/information-sessions'… { return FALSE; } // end new code elseif { return in_array($type,array('3_column_interior_page', '3_column_faculty_bio_page')); } ?> However it won… Re: elseif not working Programming Web Development by GliderPilot …($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } elseif (substr($_SERVER["REQUEST_URI"], 0, 21) == '/information-sessions') { return… Re: elseif not working Programming Web Development by kimhanu change elseif in line 15 to else Re: elseif not working Programming Web Development by timwhelan …($_SERVER["REQUEST_URI"], 0, 21) == '/information-sessions') { return true; } elseif(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return… IF, ELSEIF, ELSE statement - cannot get it to work Programming Web Development by LindaLou …lt;?php } // end of RS1 ?> <?php elseif ($totalRows_RsSearchForSale2 > 0 ) { // Show if recordset not… RS2 Show if recordset not empty ?> <?php elseif ($totalRows_RsSearchForSale3 > 0 ) { // Show if recordset not… RS3 Show if recordset not empty ?> <?php elseif ($totalRows_RsSearchForSale4 > 0 ) { // Show if recordset … if, elseif, else Programming Web Development by dandixon …($_POST['pass']); $result = confirmUser($_POST['user'], $md5pass); /* Check error codes */ elseif($result == 1){ die('That username doesn\'t exist in our… database.'); } elseif($result == 2){ die('Incorrect password, please try again.'); } else{ /* Username… Re: if, elseif, else Programming Web Development by MindSter …;Missed a field</p>"; } elseif(strlen($_POST['user']) > 30){ echo …p>"; } /* Check error codes */ elseif($result == 1){ die('That username doesn\'t …exist in our database.'); } elseif($result == 2){ die('Incorrect password, please try again.');… Re: if elseif not working Programming Web Development by edwinhermann …;>alert("Enter Phone Number")</script>;'; } elseif (!(empty($mobile))) { if ((is_numeric($mobile))) { if ((strlen($mobile)!=10)) echo…("Please Enter valid phone number")</script>;'; } } elseif (!($_FILES["uploadedfile"]["type"]=="image/pjpeg… Re: IF, ELSEIF, ELSE statement - cannot get it to work Programming Web Development by CFROG Line 456 doesn't correspond to the line numbers posted. Giving it a quick once over it looks like your first 'elseif' error is bound to come up at line 242 (as posted above) [icode]<?php elseif ($totalRows_RsSearchForSale2 > 0 ) { // Show if recordset not empty ?>[/icode] Does that seem about right? if elseif not working Programming Web Development by jacob21 …alert("Enter Phone Number")</script>;'; } elseif(!(empty($mobile))) { if((is_numeric($mobile))) { if((strlen($…valid phone number")</script>;'; } } elseif(!($_FILES["uploadedfile"]["type"]=="image… IF...ELSE...IF or IF...ELSEIF....ELSE Programming Web Development by P0lT10n …, not writing or tabbing) between: IF...ELSE...IF...ELSE... IF...ELSEIF...ELSEIF...ELSE... For example: [CODE=PHP] $i=0; if($i>…; if($i>5){ echo '$i is greater than 5.'; }elseif($i>0){ echo '$i is greater than 0 but… Re: IF, ELSEIF, ELSE statement - cannot get it to work Programming Web Development by LindaLou Yes it was line 242 where the error was, actually i have now sorted the problem by changing the closing statement of the clause, on line 283 & 283 i have combined the line to say [CODE]<?php elseif (RsSearchForSale2 > o ) { actions [/CODE] and this worked no more ERRORS. If and elseif and else syntax Programming Web Development by Jintu … ($division < 18.5) echo "You are underweight"; elseif ($division < 25){ echo "Your BMI is normal"…;; elseif ($division < 29.9) echo "You are overweight"; … Re: If and elseif and else syntax Programming Web Development by dalefish ….5){ echo "You are underweight.<br />"; } elseif ($division < 25){ echo "Your BMI is normal.<…;br />"; } elseif ($division < 29.9){ echo "You are overweight.<…