How to Fix Common Errors and Warnings -
Avi57 - 17.08.2012
Fixing Common Errors and Warnings
Introduction
Hello,
In This tutorial im Gonna Show you How to Solve Some common Errors and Warnings !
If i Forget Some Warnings or Errors, Please Post Here !
Errors
Код:
fatal error 100: cannot read from file: "..........."
It means your any Include is Missing ! Download it and Place it in Includes Folder in Pawno Folder !
Код:
error 017: undefined symbol "........."
It Means you have not defines that thing ! Define is done By : #define ............................
Код:
E:\Server\filterscripts\colorchanger.pwn(30) : error 029: invalid expression, assumed zero
It Means You Have Forget to add return 0; in the Last of Function !
Example on getting Error :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/colors", true))
{
ShowPlayerDialog(playerid, DIALOG_COLORS, DIALOG_STYLE_LIST, "Color List", "Red\nWhite\nGreen\nYellow\nBlue\nPink\nMagenta\nOrange\n{ff00ff}Next Page", "Select", "Cancel");
return 1;
}
Now After Fixing it :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/colors", true))
{
ShowPlayerDialog(playerid, DIALOG_COLORS, DIALOG_STYLE_LIST, "Color List", "Red\nWhite\nGreen\nYellow\nBlue\nPink\nMagenta\nOrange\n{ff00ff}Next Page", "Select", "Cancel");
return 1;
}
return 0;
}
Код:
error 001: expected token: ";", but found "}"
It Means you have forget to add
; in the Last of the Line !
Example Line on Error :
Код:
SetPlayerColor(playerid, COLOR_GREEN)
Fixed Line :
Код:
SetPlayerColor(playerid, COLOR_GREEN);
Warnings
Код:
warning 217: loose indentation
It means you have not added the line in a sequence !
Example line on error :
Код:
if(listitem == 0)
{
SetPlayerColor(playerid, COLOR_IVORY);
}
Fixed Line :
Код:
if(listitem == 0)
{
SetPlayerColor(playerid, COLOR_IVORY);
}
Код:
warning 211: possibly unintended assignment
It Means you have not completed a Function !
Example Line on Error :
Fixed Line :
Код:
if(listitem == 2)
Код:
Script[gamemodes/GTA-RP.amx]: Run time error 19: "File or function is not found"
It means your Any Plugin is Missing or its not up to date !
Solution : Use nativechecker plugin to Get the Problem and if your using Linux, Dont forget to add .so after Plugin name !
Hope You All Like it and Seems it to Be Helpful !
If theres anything wrong or did explained wrong, you can tell me By Posting on thread !
If My this tutorial Helped you, Dont forget to rep Me !
Re: How to Fix Common Errors and Warnings -
Kaperstone - 17.08.2012
Why are you using the symbol "!" all the time ?
So you've explaned some,now explane other 50 errors/warnings -
https://sampforum.blast.hk/showthread.php?tid=293950
btw,why are you asking for rep all the time ? nobody will give you if you'll asking for it.
Re: How to Fix Common Errors and Warnings -
doreto - 17.08.2012
I aways wondering something we see tutorials like that why people make same things over and over again like your the errors will not change if post new topic + if you will show only few of them how can this help on others if there is missing error/warning on your (tutorial),this days i see tons of bullshit people posting
Re: How to Fix Common Errors and Warnings -
Avi57 - 17.08.2012
bro, see my threads 2nd line !
Quote:
If i Forget Some Warnings or Errors, Please Post Here !
|
Re: How to Fix Common Errors and Warnings -
Johnson_Brooks - 01.09.2012
Not explained well 0/10
Learn english dude.
Re: How to Fix Common Errors and Warnings -
basse - 01.09.2012
Example line on error :
Code:
pawn Код:
if(listitem == 0)
      {
        SetPlayerColor(playerid, COLOR_IVORY);
      }
Fixed Line :
Code:
pawn Код:
if(listitem == 0)
      {
        SetPlayerColor(playerid, COLOR_IVORY);
      }
may i ask, What is the difference?
Re: How to Fix Common Errors and Warnings - [COD5]DarKnight - 02.09.2012
Quote:
Originally Posted by basse
Example line on error :
Code:
pawn Код:
if(listitem == 0) Â Â Â Â Â Â { Â Â Â Â Â Â Â Â SetPlayerColor(playerid, COLOR_IVORY); Â Â Â Â Â Â }
Fixed Line :
Code:
pawn Код:
if(listitem == 0) Â Â Â Â Â Â { Â Â Â Â Â Â Â Â SetPlayerColor(playerid, COLOR_IVORY); Â Â Â Â Â Â }
may i ask, What is the difference?
|
Yeah same question