[Release]Automatic Cps in Inventory

12/16/2009 18:17 Basser#16
Quote:
Originally Posted by Hepatitis C View Post

It does not need to be else if.
Mine is "if" and it works perfectly.
Pretty sure it doesn't matter.
12/16/2009 18:23 Electro51#17
the code works perfectly
12/16/2009 22:21 Arcо#18
Quote:
Originally Posted by Smythe94 View Post
Pretty sure it doesn't matter.

Isn't that pretty much what I just said.
12/18/2009 23:38 Mjnorman#19
haha nice release but really this is a no brainer but hey im sure itl help the noobs extend there reaches to trying to be able to run a server
12/21/2009 18:53 pro4never#20
Quote:
Originally Posted by Hepatitis C View Post

It does not need to be else if.
Mine is "if" and it works perfectly.
very minor and I'm sure most people know this but for those who don't.


If statements function in a logical pattern.


if
- if something then something. ONLY ONE or else all are valid

else if
- if first if didn't go off, the else can still happen. Can have lots of these in a row

else
- if none of the previous if/else if's were triggered else is triggered.


I have never looked at this new source so I don't know how that file is structured but just use some common sense. If you use an if in between a long list of else if's then you will break it up into 2 separate sections


Eg:

if x > 1
do x
if x > 2
do y

if x is under 1 then NEITHER go off
if x = 2 x happens
if x = 3 or more x AND y happens


Eg 2:

if x > 1
do x
else if x > 2
do y
else if x > 0
do z

again, x = 2 x happens
x >= 3 x happens (NOT X AND Y BECAUSE IT'S AN ELSE IF) In this case Y will never happen, nor will z.



So if in the existing source you have a logical flow of

if
else if
else if
else if
else

if you were to place a new if command somewhere in the else if statements, you will separate the flow of logic into 2 distinct sections causing new (sometimes odd things) to happen to your drop rate.


Anyways, not directed at anyone in particular, just figured I'd offer a small warning on when to use if/else if statements.
12/21/2009 20:30 ImmuneOne#21
Then, my advice to you is, use spoilers instead of posting that miles long post.
02/08/2010 21:53 paralyzer2#22
I get an Error, I AM doing everything right,

In Mob.cs I get an error "The name 'Cps' does not exist in the current context.
In Droprates.cs I get an error: 'NewestCOServer.DropRates' does not contain a deinition for 'CPs'

Help please
02/19/2010 00:42 gangsta119#23
Cps = 2

remember to put a commor

Cps = 2,

otherwise u will get errors people

Conquer 3.0 rules !
02/28/2010 22:50 Decker_#24
Quote:
Originally Posted by .Arco View Post

Then go to OldCODB and at the very bottom put CPs=DropRate of your choice.
In DropRates.ini?
That is what I did and it didn't work.
I killed a pheasant and no cp's went to my inventory.

I went to the bottom of DropRates.ini and typed CPs=250 and still nothing
02/28/2010 22:53 Arcо#25
Quote:
Originally Posted by Decker_ View Post
In DropRates.ini?
That is what I did and it didn't work.
I killed a pheasant and no cp's went to my inventory.

I went to the bottom of DropRates.ini and typed CPs=250 and still nothing
Then you did it wrong.
02/28/2010 22:54 Decker_#26
Can you upload your mob.cs and DropRates.cs?
02/28/2010 22:56 Arcо#27
Quote:
Originally Posted by Decker_ View Post
Can you upload your mob.cs and DropRates.cs?
Nope.
02/28/2010 22:58 Decker_#28
Ok, my friend said they drop cpminibag, what do i search for to make pheasants drop them more often?
02/28/2010 22:59 Arcо#29
Quote:
Originally Posted by Decker_ View Post
Ok, my friend said they drop cpminibag, what do i search for to make pheasants drop them more often?
The cpbag drop rate.
02/28/2010 23:26 Decker_#30
where can I find that at?