![]() |
IOBit Software
|
|
|
||||||
| Lounge Hang out and have some fun with your fellow Majorgeeks! |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
if (authorisation = "yes") {
launchmissiles(); } ![]()
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
| Sponsored links |
|
|
|
#2
|
||||
|
||||
|
Anyone find the problem yet?
![]()
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
|
#3
|
|||
|
|||
|
the answer is "epswiche clams"
![]() no??, is it the spelling of authoriZation?? |
|
#4
|
||||
|
||||
|
Im gonna go with, theres no 'else' so wouldn't it do the launchmissles() no matter what?
|
|
#5
|
||||
|
||||
|
Nope
![]() spelling means nothing, and I'm english so i spell it authorisation
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
| Sponsored links |
|
|
|
#6
|
||||
|
||||
|
spaces between authorisation and = sign??
__________________
An amateur will practice until they get it right. A professional will practice until they don't get it wrong. |
|
#7
|
||||
|
||||
|
nope, but closer
![]()
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
|
#8
|
||||
|
||||
|
no 'then' so the launchmissles() would be separate from the 'if'.
not sure seeing as how i don't know c |
|
#9
|
||||
|
||||
|
Quote:
but i would say that authorisation= launchmissles |
|
#10
|
||||
|
||||
|
The Brackets? I seem to remember those brackets hiding text in Pascal, but that was 15 years ago, and I haven't done any programming since. Never did C.
|
| Sponsored links |
|
|
|
#11
|
||||
|
||||
|
im gonna go with you, now that i think about it. WHen I did c++, I never used parenthesis. Heck, neither in basic too.
|
|
#12
|
||||
|
||||
|
Quote:
Hmmm. Now that I think back, maybe it was * * that hid text. Maybe the ";" is in the wrong place, not being on the end of the line(after the last bracket). Maybe I'm rambling... |
|
#13
|
||||
|
||||
|
if (authorisation = "yes") {(launchmissiles)};
Makes more sense to me. Then again, I'm not a programmer. : :
__________________
“Phantom is rough on rough-necks!” ~ Old Jungle Saying |
|
#14
|
||||
|
||||
|
nope, launchmissiles() is a perfectly normal bit of code.
You're not gunna get it, unless Kodo comes along all of a sudden ![]() SPOILER: its the authorisaton="yes" part. when you are comparing two values, you use ==, !=, >, < .... the = charachter signifies the operation of setting a variable. That condition says that if (set authorisation to yes) works correctly, then... So, prodvided the variable can be set, it will always return true, regardless of what authorisation was to start with.
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
|
#15
|
||||
|
||||
|
I knew that but didn't see your first post until after you posted the answer, honest!
Here are some other real-life software catstrophic failures: http://www5.in.tum.de/~huckle/bugse.html see also: http://forums.majorgeeks.com/showthr...562#post507562
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
| Sponsored links |
|
|
|
#16
|
||||
|
||||
|
() is going to launch missiles regardless?
Steve
__________________
LIVE + LOVE + BURN + DIE "We All Look The Same...But I Am The Killer" |
|
#17
|
||||
|
||||
|
No, (authorisation = yes) makes authorisation equal to yes, rather than checking if it equals yes or not. To check it, it needs to be if (authorisation == yes).
__________________
(¯`·._.·[ Gø|ÐFï§h ]·._.·´¯) Folding@Geeks, TEAM 12072 http://www.majorgeeks.com/page.php?id=9 |
|
#18
|
||||
|
||||
|
ahhh, in C++ I used to spend hours trying to figure out what I was going wrong, turned out to be just that.
|
|
#19
|
||||
|
||||
|
I'm learning a bit of PHP and this seems like it would catch quite a few people. So whats wrong with this one?
$blah = "Hello"; print ('$blah and Welcome'); Goldfish, stay outta this one! |
|
#20
|
||||
|
||||
|
You don't use print in PHP. You use echo...or at least I think so. And, you don't need to put the variable in the (). This is how I think it should be:
$blah = "Hello"; echo $blah (' and Welcome');
__________________
www.chrisesselborn.tk |
| Sponsored links |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|