Raised This Month: $51 Target: $400
 12% 

Small scripting tutorials, and how to fix some common errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-01-2004 , 14:38   Small scripting tutorials, and how to fix some common errors
#1

Last Update: August 01, 2004 01:44:16 PM
Note: PM me with comments.
Note2: If you have a tutorial you want posted here, PM me with it
So you want to start creating plugins.
By the time you get here, I assume you know how to compile plugins, the basic syntax of some small commands, and how to declare variables. If you don't know either, I suggest you read some more before you get here.

Here are some good things to read to get the basics of Pawn:
Tutorial #1 Introduction to Pawn
Tutorial #2 Intro to AMX Mod X Scripting
Tutorial #3 Pawn Tutorial
Pawn Language Documentation (PDF) *Note: This is a little more advanced, I suggest reading it after you learn the basics

Tutorials in this thread:
Basic Scripting Tutorial (devicenull)
SQL Scripting Tutorial (devicenull)

Some common errors, and how to fix them.
Error: I get no errors, but I get a 0kb output file, and/or the compiler crashes
Solution: Somewhere in your code, you forgot to close something. This is usually caused by forgetting to put a " at the end of text, but it can also be caused by forgetting a ) or }

Error: warning 202: number of arguments does not match defintion
Solution: On the line it says, you don't have enough paramaters. You forgot to put something in, and the compiler noticed. Just go to that line, compare the command you used to the one in the include file. It might be something as simple as you put a period instead of comma.

Error: error 035: argument type mismatch (argument X)
Solution: One of your arguments is the wrong type. This usually happens when the command is expecting a float, and you gave it an integer (I didn't go over floats here, they can be annoying). Or it could be the command expected a string, and you gave it an integer.

Last edited by Xanimos; 02-02-2007 at 02:47. Reason: Updating the old information.
devicenull is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode