Code center > Darwinbots Program Source Code
+= -= *= /=
(1/1)
Botsareus:
I want to make the following code work from case4 to case7:
--- Quote ---Private Sub ExecuteStores(n As Integer)
Select Case n
Case 1 'store
DNAstore
Case 2 'inc
DNAinc
Case 3 'dec
DNAdec
Case 4 '+=
Case 5 '-=
Case 6 '*=
Case 7 '/=
End Select
End Sub
--- End quote ---
I will like to know two things before I get started:
1.) How much energy I should charge?
--- Quote ---store charges: - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER))
inc and dec charge: - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER)) / 10
--- End quote ---
2.) This is how the /= works if I am not mistaken:
--- Quote ---3
20
/=
--- End quote ---
is the same as:
--- Quote ---20 *
3
div
20
store
--- End quote ---
Am I correct?
Numsgil:
At the moment those commands are no-ops.
But if you want 'em in, it looks like you have the right idea. Charge 'em as a normal store, and treat them like you did.
Botsareus:
Sounds like a plan.
Prsn828:
Ooohh! Sounds like something new to play with soon!
Am I right? I hope I am
Arzgarb:
I'd change their names to something like "addstore, substore, multstore, divstore" to better fit in with the current syntax and to avoid confusion with !=, %= etc.
Navigation
[0] Message Index
Go to full version