The operation - cannot accept the arguments: , [""], [1]

Hi guys. I have a problem, I'm doing a quiz project, and my timer is apparently the problem. I put a time of 60 seconds for each question. It works normally, the quiz itself, but a bug warning appears as follows in the print. My game has two problems and I wanted you to help me identify and solve it, because I'm new to programming and I don't have much idea.

When I disable the when any clocker (timer) block, the message does not appear both on the emulator and on the blocks screen, the time obviously stops counting and I can answer the questions, so I think the problem is in the following block.

Another problem is also that my game when I complete the 10 questions is not going to the scoreboard, it just stops anyway.
EDIT: my ''if cronometragem.Text = 1'', is ''if cronometragem.Text = 0'', i was just testing to try solve this, but I cant.

Help me!! Please!!

block
error

image

the error says that the "-" (minus) operation cannot accept the arguments [""] and [1]. That is because when you look at the first block of the when any Clock.Timer code, you are setting cronometragem.Text to cronometragem.Text-1. But it seems like at initialization, you don't set the Text to some integer, so it stays "" as default. That's why it can't computate the minus operation, you can't subtract 1 from "".
Just add a block in the Screen.Initialize code that intitializes the cronometragem.Text to some wanted integer.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.