CS2506
hint text divides two whole numbers: the result keeps its fraction. Write int(text) if a whole number was meant.
#What it means
This is a hint from the import report. Dividing two whole numbers in ChartScript keeps the fraction (7 / 2 is 3.5). Some other script languages drop it, so the converted script may compute something different from the original.
#Typical cause
- An
int / intdivision in a script converted by the importer, where the original language would have rounded down.
#How to fix it
If a whole number was meant, wrap the division: int(7 / 2) gives 3. If the fraction is wanted, nothing needs to change. See Known differences.
#Example
This hint is shown only by the import report. A script compiled in the editor never gets it, so no example can be checked here.
#Related
- CS2008 — Expected expected but got got.