[QUESTION] try
#1

some use to 'try' structure? (i think is an structure, not sure)

i mean
pawn Код:
try
Reply
#2

what are you want to say?
i can't understand
Reply
#3

Quote:
Originally Posted by Justinclaveria123
Посмотреть сообщение
what are you want to say?
i can't understand
look, write 'try' in pawn.exe i don't know why its in blue
Reply
#4

Quote:
Originally Posted by LiMPiTo
Посмотреть сообщение
look, write 'try' in pawn.exe i don't know why its in blue
hmm , where did you get that code?
Reply
#5

"try-catch" is a control structure in many languages, but it does not exist in Pawn. There are other C keywords that are highlighted in Pawno such as "void", "class", "throw", "int" and "double", none of which are valid in Pawn. The editor was probably adapted from a C editor to work with Pawn scripts and the author neglected to change the syntax highlighting.
Reply
#6

It is a way of error handling...
Like if u get a error which could crash server then this would prevent it to crash..
i have used it in JAVA but never in pawn
Slice made try-catch block for pawn, you can learn about it here - https://sampforum.blast.hk/showthread.php?tid=429381
Reply
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
"try-catch" is a control structure in many languages, but it does not exist in Pawn. There are other C keywords that are highlighted in Pawno such as "void", "class", "throw", "int" and "double", none of which are valid in Pawn. The editor was probably adapted from a C editor to work with Pawn scripts and the author neglected to change the syntax highlighting.
im with you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)