17.08.2012, 03:51
Fixing Common Errors and Warnings
IntroductionHello,
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: "..........."
Код:
error 017: undefined symbol "........."
Код:
E:\Server\filterscripts\colorchanger.pwn(30) : error 029: invalid expression, assumed zero
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; }
Код:
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 "}"
Example Line on Error :
Код:
SetPlayerColor(playerid, COLOR_GREEN)
Код:
SetPlayerColor(playerid, COLOR_GREEN);
Warnings
Код:
warning 217: loose indentation
Example line on error :
Код:
if(listitem == 0) { SetPlayerColor(playerid, COLOR_IVORY); }
Код:
if(listitem == 0) { SetPlayerColor(playerid, COLOR_IVORY); }
Код:
warning 211: possibly unintended assignment
Example Line on Error :
Код:
if(listitem = 2)
Код:
if(listitem == 2)
Код:
Script[gamemodes/GTA-RP.amx]: Run time error 19: "File or function is not found"
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 !