Let's see. This is for that Chess960 game where the kings start on g1/g8? Yeah, castling is kind of odd in that situation.
You can "move" your king "onto" your castling rook to castle. That is, move your king to h8, where you currently have a Rook. That should instead leave your king where it is and jump the rook to f8.
*Note: Moving the king onto the castling rook should always work where castling is allowed.
how can i castle? my king is already on g8(black). i try to move my rook but no joy.