Questions from a "dummy" - page 179

 

Next...

Get an error code, reset it, output it.

Agree that the sequence should be different.

It's yours.

int Error=GetLastError( ) ; 
ResetLastError();
printf("Error %i ",Error);

It's mine.

Print("Error=",GetLastError());
ResetLastError();
 
No, I store the value in the Error variable and let it reset!
 
Dimka-novitsek:
No, I store the value in the Error variable and let it reset!
I agree.
 
Yes, and yours is shorter! Thank you.
 
Dimka-novitsek:
Yes, and yours is shorter! Thank you.

But I would add a check greater than 0, so as not to output unnecessarily.

if(GetLastError()>0) {Print("Error OnTick() (",GetLastError(),") ");} ResetLastError();
 
Yes, thank you!!!
 

But it has to write these prints into the magazine, doesn't it! I've never had a problem with prints on four. Here they are written occasionally, not in every programme. I can't see if I'm an idiot, but I can't see the error! It's just the prints!


 
What's in the Experts tab?
 
Shass.
 
Oh, thank you!!!! There it is!!!