473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

skips through

134 100+
Expand|Select|Wrap|Line Numbers
  1. bool LevelUp()
  2. {
  3.      if(PlayersLevel=1) 
  4.      {
  5.           if (PlayersExp < 5)
  6.           {
  7.  
  8.           }    
  9.           if (PlayersExp > 4)
  10.           {
  11.           cout<<"You have now reached Level 2\n\n";
  12.           PlayersLevel==2;
  13.           AddPlayerPower();
  14.           CheckLevelUp();
  15.           RentRoom();  
  16.           }  
  17.  
  18.      }//End If PlayersLevel=1
  19.  
  20.      if(PlayersLevel=2)
  21.      {
  22.           if (PlayersExp < 10)
  23.           {
  24.  
  25.           }  
  26.           if (PlayersExp > 9)
  27.           {
  28.           cout<<"You have now reached Level 3\n\n";
  29.           PlayersLevel==3;
  30.           AddPlayerPower();
  31.           CheckLevelUp();
  32.           RentRoom();  
  33.           }                          
  34.      }//End If PlayersLevel=2
  35.  
  36.      if(PlayersLevel=3)
  37.      {
  38.           if (PlayersExp < 15)
  39.           {
  40.  
  41.           }  
  42.           if (PlayersExp > 14)
  43.           {
  44.           cout<<"You have now reached Level 4\n\n";
  45.           PlayersLevel=4;
  46.           AddPlayerPower();
  47.           CheckLevelUp();
  48.           RentRoom();  
  49.           }                          
  50.      }//End If PlayersLevel=2
  51.  
  52.      if(PlayersLevel=4)
  53.      {
  54.           if (PlayersExp < 20)
  55.           {
  56.  
  57.           }  
  58.           if (PlayersExp > 19)
  59.           {
  60.           cout<<"You have now reached Level 5\n\n";
  61.           PlayersLevel==5;
  62.           AddPlayerPower();
  63.           CheckLevelUp();
  64.           RentRoom();  
  65.           }                          
  66.      }//End If PlayersLevel=2
  67.  
  68.      if(PlayersLevel=5)
  69.      {
  70.           if (PlayersExp < 30)
  71.           {
  72.  
  73.           }  
  74.           if (PlayersExp > 29)
  75.           {
  76.           cout<<"You have now reached Level 6\n\n";
  77.           PlayersLevel==6;
  78.           AddPlayerPower();
  79.           CheckLevelUp();
  80.           RentRoom();  
  81.           }                          
  82.      }//End If PlayersLevel=2
  83.  
  84.      if(PlayersLevel=6)
  85.      {
  86.           if (PlayersExp < 40)
  87.           {
  88.  
  89.           }  
  90.           if (PlayersExp > 39)
  91.           {
  92.           cout<<"You have now reached Level 7\n\n";
  93.           PlayersLevel==7;
  94.           AddPlayerPower();
  95.           CheckLevelUp();
  96.           RentRoom();  
  97.           }                          
  98.      }//End If PlayersLevel=2
  99.  
  100.      if(PlayersLevel=7)
  101.      {
  102.           if (PlayersExp < 55)
  103.           {
  104.  
  105.           }  
  106.           if (PlayersExp > 54)
  107.           {
  108.           cout<<"You have now reached Level 8\n\n";
  109.           PlayersLevel==8;
  110.           AddPlayerPower();
  111.           CheckLevelUp();
  112.           RentRoom();  
  113.           }                          
  114.      }//End If PlayersLevel=2
  115.  
  116.      if(PlayersLevel=8)
  117.      {
  118.           if (PlayersExp < 75)
  119.           {
  120.  
  121.           }  
  122.           if (PlayersExp > 74)
  123.           {
  124.           cout<<"You have now reached Level 9\n\n";
  125.           PlayersLevel==9;
  126.           AddPlayerPower();
  127.           CheckLevelUp();
  128.           RentRoom();  
  129.           }                          
  130.      }//End If PlayersLevel=2
  131.  
  132.      if(PlayersLevel=9)
  133.      {
  134.           if (PlayersExp < 100)
  135.           {
  136.  
  137.           }  
  138.           if (PlayersExp > 99)
  139.           {
  140.           cout<<"You have now reached Level 10\n\n";
  141.           PlayersLevel==10;
  142.           AddPlayerPower();
  143.           CheckLevelUp();
  144.           RentRoom();  
  145.           }                          
  146.      }//End If PlayersLevel=2
  147. }
  148.  
  149.  
  150. bool CheckLevelUp()
  151.      if(PlayersLevel=1)
  152.      {
  153.           if (PlayersExp < 5)
  154.           {
  155.           }    
  156.           if (PlayersExp > 4)
  157.           {
  158.           cout<<"\nYou should sleep so you can put together what you have learned.\n\n";
  159.           }  
  160.  
  161.      }//End If PlayersLevel=1
  162.  
  163.      if(PlayersLevel=2)
  164.      {
  165.           if (PlayersExp < 10)
  166.           {
  167.           }  
  168.           if (PlayersExp > 9)
  169.           {
  170.           cout<<"You should sleep on what you've learned.\n\n";
  171.           }                          
  172.      }//End If PlayersLevel=2
  173.  
  174.      if(PlayersLevel=3)
  175.      {
  176.           if (PlayersExp < 15)
  177.           {
  178.  
  179.           }  
  180.           if (PlayersExp > 14)
  181.           {
  182.           cout<<"You should sleep on what you've learned.\n\n";
  183.           }                          
  184.      }//End If PlayersLevel=2
  185.  
  186.      if(PlayersLevel=4)
  187.      {
  188.           if (PlayersExp < 20)
  189.           {
  190.  
  191.           }  
  192.           if (PlayersExp > 19)
  193.           {
  194.           cout<<"You should sleep on what you've learned.\n\n";
  195.           }                          
  196.      }//End If PlayersLevel=2
  197.  
  198.      if(PlayersLevel=5)
  199.      {
  200.           if (PlayersExp < 30)
  201.           {
  202.  
  203.           }  
  204.           if (PlayersExp > 29)
  205.           {
  206.           cout<<"You should sleep on what you've learned.\n\n";
  207.           }                          
  208.      }//End If PlayersLevel=2
  209.  
  210.      if(PlayersLevel=6)
  211.      {
  212.           if (PlayersExp < 40)
  213.           {
  214.  
  215.           }  
  216.           if (PlayersExp > 39)
  217.           {
  218.           cout<<"You should sleep on what you've learned.\n\n";
  219.           }                          
  220.      }//End If PlayersLevel=2
  221.  
  222.      if(PlayersLevel=7)
  223.      {
  224.           if (PlayersExp < 55)
  225.           {
  226.  
  227.           }  
  228.           if (PlayersExp > 54)
  229.           {
  230.           cout<<"You should sleep on what you've learned.\n\n";
  231.           }                          
  232.      }//End If PlayersLevel=2
  233.  
  234.      if(PlayersLevel=8)
  235.      {
  236.           if (PlayersExp < 75)
  237.           {
  238.  
  239.           }  
  240.           if (PlayersExp > 74)
  241.           {
  242.           cout<<"You should sleep on what you've learned.\n\n";
  243.           }                          
  244.      }//End If PlayersLevel=2
  245.  
  246.      if(PlayersLevel=9)
  247.      {
  248.           if (PlayersExp < 100)
  249.           {
  250.  
  251.           }  
  252.           if (PlayersExp > 99)
  253.           {
  254.           cout<<"You should sleep on what you've learned.\n\n";
  255.           }                          
  256.      }//End If PlayersLevel=2
  257. }
  258.  

when im level 2....
and i dont have enough exp to level up...
and i run the level up thing...
it runs AddPlayerPower();
and it says you should sleep to put together what youve learned even though i dont have enough exp

my guess it is when i say PlayerLevel= or somthing like that but im not sure.
thanks
May 4 '07 #1
2 1084
ilikepython
844 Expert 512MB
[
when im level 2....
and i dont have enough exp to level up...
and i run the level up thing...
it runs AddPlayerPower();
and it says you should sleep to put together what youve learned even though i dont have enough exp

my guess it is when i say PlayerLevel= or somthing like that but im not sure.
thanks
Yes you have to say:
"if (PlayerLevel == 2){}"
Don't forget that the single equal sign is for assignment. You don't to assign to PlayerLevel, you want to compare the level. The double equal sign (==) checks for equality.
May 4 '07 #2
lumpybanana247
134 100+
that worked
now i get it ( '=' is assignment and '==' is comparing)
thanks
May 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: pwinward | last post by:
Using C++ .NET 2003 and getting: "The breakpoint will not currently be hit. No executable code is associated with this line." My app links to my static library and when I try debugging either...
7
by: Bob | last post by:
Hi, I am trying to use BULK INSERT with format file. All of our data has few bytes of header in the data file which I would like to skip before doing BULK INSERT. Is it possible to write...
0
by: Don | last post by:
Hi: When I try and loop through the reader using any of the Read methods, I never get the five records returned that I expect. On the SQL Query Analyzer end, my query returns 5 results. Using...
2
by: Eddy Bee | last post by:
Hi there, I'm encountering an inexplicable problem with page formatting in reports. Here's the easiest way to explain it: The Detail section of my report contains two elements: And let's...
0
by: Johan | last post by:
Hi, Anyone know how to tell request.item to return non-english characters. In my example the scandiavian letters ÅÄÖåäö (AAOaao with circles and dots above) gets skiped. Here is the code in...
0
by: EC | last post by:
There are times when I use the Search utility of windows explorer to find ASPX file(s) that contains a specific word. The Search utility however skips the <script ..> </script> block in the ASPX...
3
by: David Garamond | last post by:
Am I correct to assume that SERIAL does not guarantee that a sequence won't skip (e.g. one successful INSERT gets 32 and the next might be 34)? Sometimes a business requirement is that a serial...
1
by: David Lozzi | last post by:
Howdy, Below is my SELECT statement. The returned list is suppose to return the TOP 12 when sorted by MIN(dtDate). It sorts the records correctly and only displays 12 records, but to meet the 12...
3
by: vegtard | last post by:
by now, you have no doupt replied to many of mine and my buddy (børntard)'s questions about our faulty programming concerning the over-complicated mega-script to design your dungeons and dragons...
49
by: W. Watson | last post by:
Is there an editor that allows one to position to put the cursor and then by pushing some button goes to the end of the def? -- Wayne Watson (Nevada City, CA) Web Page: <speckledwithStars.net>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.