[Tutorial] Scripting guide #1 - Dealing with errors
#1

Evan's Scripting Guides
Scripting Guide #1
Dealing with the errors


To a new SA:MP scripter who doesn't really know how to script in pawno, let alone what pawno is, can be very hard. Then, you sometimes have to deal with errors and don't know what they mean or how to deal with them. This guide will focus on dealing with compiling errors in the pawno scripting launage.

Some common errors:
Undefined symbol
Symbol already defined
Invalid function or declaration

The first compiling error we'll be discussing is Undefined symbol, which is error #017. This error basically means you have failed or incorrectly defined a symbol. In other words, you haven't defined something.

This error isn't very hard to fix once you know what the undefined symbol is. Based on what type of symbol it is you'll have to define it in a different way. It's usually a variable, constant or function. This error usually occurs when someone copy and pastes something but something they have pasted needs to be defined. It also usually occurs when the script mis-spells a symbol.

In the case of copy and pasting, you will potentially need the original script/source. You will need to find the define/stock/etc and copy and paste it into the script you're working on. You can easily search the script by using "CTRL+F". If its not defined there, check the original script's includes. If you have not copy and pasted, then check for any mis-spellings. If you still cannot figure out what is causing this error, feel free to either reply to this tutorial or make a topic in "scripting help". We'd be glad to help.

The next compiling error we will be discussing is symbol already defined. This occurs when you define something twice. It's really easy to fix. Just remove one of the defines, and it should work. If not, once again feel free to make a help topic in "scripting help" or post a reply on this tutorial.

I'll be adding more and more errors in the next few days and I'll continue updating this tutorial as time goes on. Thank you, and as always please give some feedback as this is only my second tutorial.
Reply
#2

to many tutorials about warnings/errors nothing new,half of newbies wont understand what you talk about here...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)