function tile_event() {
if (bmapno ==1) {
if (creditsf_add(-2000)) { // transaction would be above 0?
wait(1);
ent_create(ship_b1, my.x, ship_function); // create / place ship at my.x?
goto(fExit);
}
}
if (bmapno ==2) {
if (creditsf_add(-3000)) {
wait(1);
ent_create(ship_b2, my.x, ship_function); // create / place ship at my.x?
goto(fExit);
}
}
if (bmapno ==3) {
if (creditsf_add(-500)) {
wait(1);
ent_create(ship_b3, my.x, ship_function); // create / place ship at my.x?
goto(fExit);
}
}
fExit:
}
(but there is a cleaner way to do that and similar.)
creditsf_add and creditsf_update were using credits_n and credits_s.
Did 'you' modify the functions so that the variables credits and credit are used instead?
For this, use only one set of variables to represent credits:
credit_n, credit_s
OR
credits, credit
(Perhaps, 'I' should not have introduced additional variables.)