Error 217 pawno

error 217 pawno

217: loose indentation Indentation means to push (indent) text along from the left of the page (by pressing the TAB key). This is common. Pawn Stars is an American reality television series that premiered on History on July 19, 2009. The series is filmed in Las Vegas, Nevada. written by an old scripter. it have alot of "warning 217: loose indentation" warning and i want That's not a bug - that's a feature.

Error 217 pawno - speaking, would

I was editing a Script I had and afterwards (Beginner Scripter, probably messed it up) I had these
-
(2627) : error 004: function "FixHour" is not implemented
(3997) : warning 217: loose indentation
(4011) : warning 217: loose indentation
(4417) : warning 217: loose indentation
(4432) : warning 217: loose indentation
(4486) : warning 217: loose indentation
(4580) : warning 217: loose indentation
(4590) : warning 217: loose indentation
(4708) : warning 217: loose indentation
(5438) : error 017: undefined symbol "ProxDetector"
(5451) : error 017: undefined symbol "ProxDetector"
(5681) : error 017: undefined symbol "ProxDetector"
(5696) : error 017: undefined symbol "ProxDetector"
(7246) : error 017: undefined symbol "ProxDetector"
(7570) : error 017: undefined symbol "ProxDetector"
(7583) : error 017: undefined symbol "ProxDetector"
(10285) : error 017: undefined symbol "ProxDetector"
(11402) : error 017: undefined symbol "ProxDetector"
(11454) : error 017: undefined symbol "ProxDetector"
(11529) : error 017: undefined symbol "ProxDetector"
(11568) : error 017: undefined symbol "ProxDetector"
(11584) : warning 217: loose indentation
(11603) : error 017: undefined symbol "ProxDetector"
(11622) : warning 217: loose indentation
(12598) : warning 217: loose indentation
(12599) : warning 217: loose indentation
(12628) : error 017: undefined symbol "encode_tires"
(12644) : error 017: undefined symbol "encode_tires"
(12643) : warning 204: symbol is assigned a value that is never used: "carid"
(12644) : warning 204: symbol is assigned a value that is never used: "tires"
(12642) : warning 203: symbol is never used: "lights"
(12642) : warning 203: symbol is never used: "doors"
(12642) : warning 203: symbol is never used: "panels"
(12660) : error 017: undefined symbol "encode_tires"
(12659) : warning 204: symbol is assigned a value that is never used: "carid"
(12660) : warning 204: symbol is assigned a value that is never used: "tires"
(12658) : warning 203: symbol is never used: "lights"
(12658) : warning 203: symbol is never used: "doors"
(12658) : warning 203: symbol is never used: "panels"
(12694) : error 017: undefined symbol "ProxDetector"
(12701) : error 017: undefined symbol "ProxDetector"
(13311) : error 017: undefined symbol "ProxDetector"
(13578) : warning 217: loose indentation
(15089) : error 004: function "FixHour" is not implemented
(16280) : error 004: function "FixHour" is not implemented
(16352) : error 004: function "FixHour" is not implemented
(17719) : error 017: undefined symbol "dcmd_oprison"
(17721) : error 017: undefined symbol "dcmd_unban"
-
Idk how to fix them and if you could help that'd be Awesome :P
If you have Teamviewer you can check it out
Skype : Chuck_Hard (Barney Stinson Pic)
or just PM or leave a Message on here

pomoc problem s registraci/login system

Ahoj

Mám v PC jeden register systém ale dělá mi to errory prosim opravite mi to aby to fungovalo :(

tady jsou errory

C:\Users\joseph\Desktop\JFS.pwn(17) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(18) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(19) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(96) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(98) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(121) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(126) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(127) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(130) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(133) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(139) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(149) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(162) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(164) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(166) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(181) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(188) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(209) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(210) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(220) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(231) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(233) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(234) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(237) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(242) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(250) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(289) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(308) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(309) : error 010: invalid function or declaration
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


4 Errors.

#include <a_samp> <a_samp> #include <dof2> <dof2> #include <a_http> <a_http> #define MAILER_URL "geradoresjfs.site90.net/mailer.php" // Archive. Php> upe your <! #include <mailer> #define CONTAS \ "PlayersJFS/%s.ini" #define REGISTRO \ (787) #define LOGIN \ (790) #define MAXPLAYERSJFS \ (50) // Server Slots #define DinheiroInicio \ (1000) // Begins with MIL Grana #define LevelInicio \ (1) // Starts with Level 1 #define EmailServidor \ ("[email protected]") //Your Email Addres #define NomeServidor \ ("[JFS/SAMP] - Recuperar Senha") // Configure #define TAtualizarLevel \ (4000) // Time to Upgrade Level, 4 man! new Invalido[MAXPLAYERSJFS], Nome[MAX_PLAYER_NAME], String[128] ; new Matou[MAXPLAYERSJFS], Morreu[MAXPLAYERSJFS], Level[MAXPLAYERSJFS], Logou[MAXPLAYERSJFS] ; public OnFilterScriptInit() { SetTimer("AtualizarLevel", TAtualizarLevel, true); return true; } public OnFilterScriptExit() { for(new i=0; i<MAXPLAYERSJFS; ++i) { CarregarPlayer(i); } DOF2_Exit(); return true; } public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerConnected(killerid)) { Matou[killerid]++; Level[killerid] ++; GameTextForPlayer(killerid,"~>~~r~Killed + 1 Level.!!!",4000,3); } if(IsPlayerConnected(playerid)) { GameTextForPlayer(playerid,"~>~~r~Dead - Level 1!!!",4000,3); Level[playerid] --; } return true; } public OnPlayerDisconnect(playerid, reason) { SalvarPlayer(playerid); return true; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strfind(cmdtext, "/stats", true) != -1) { if(strlen(cmdtext) == 11) return SendClientMessage(playerid, -1, "/mudaremail [EMAIL]"); strdel(cmdtext, 0, 11); GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), CONTAS, Nome); new Celula[128]; format(Celula, sizeof(Celula),"JFS Registration System] - You Changed Your Email from %s to %s !!", DOF2_GetString(String,"Email"), cmdtext); SendClientMessage(playerid, -1, Celula); SendClientMessage(playerid, -1, "Caution! you should check if it's right! you may lose your Account."); DOF2_SetString(String,"Email", cmdtext); DOF2_SaveFile(); return true; } return false; } public OnPlayerConnect(playerid) { SendClientMessage(playerid, -1, "This server has a FilterScript Created By JFS - Jonathan Feitosa:)."); GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), CONTAS, Nome); if(!DOF2_FileExists(String)) { format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Unregistered\n\n{FFFFFF} Enter A Password For Your Account Register\n", Nome); ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "System Register", String, "Register", "Cancel"); } else { format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly in space provided\n", Nome); ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "System Login", String, "Login", "Cancel"); } return true; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == REGISTRO) { if(response) { if(!\n\n{1E90FF} PS: If you lose your password, use to recover there.\n\n", "Configure", ""); return true; } else { SendClientMessage(playerid, 0xFF0000AA, "Why Do not You got kicked Register If I wanted!!facebook.com/GoHumorGTA\n\nPassword: %s\n\n\nContato Skype: jonathanfeitosajfs\nContato MSN: [email protected]", DOF2_GetString(String,"Senha")); SendMail(DOF2_GetString(String,"Email"), EmailServidor, NomeServidor, "JFS Projects - Recover Password", Celula); SendClientMessage(playerid, -1, "An email with your password has been sent to your email address successfully."); SendClientMessage(playerid, -1, "PS: The Times They may take about 5 minutes at most."); Kick(playerid); } else { SendClientMessage(playerid, -1, "You would not Send an Email so got kicked :)"); Kick(playerid); } return true; } if(dialogid == LOGIN) { if(response) { if(!strlen(inputtext)) { GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly to login\n", Nome); ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Sistema de Login", String, "Login", "Cancel"); SendClientMessage(playerid,0x1E90FFAA,"FIELD BLANK - Enter your password correctly!"); return true; } GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), CONTAS, Nome); if(!strcmp(inputtext,DOF2_GetString(String,"Senha"),false)) { Logando(playerid); return true; } else { Invalido[playerid] += 1; if(Invalido[playerid] == 5) return ShowPlayerDialog(playerid, 6784, DIALOG_STYLE_MSGBOX, "JFS registration - Password Recovery", "\n\n{33CCFF}Press 'Submit' to send an email to your email address containing your password.\n\n{7491F6}PS: I hope it's a valid email address, if not, please contact Administrator Owner.\n\n", "Submit", "Cancel"); SendClientMessage(playerid,0x00FF00AA,"Incorrect password, If you miss 5 times there will have to recover by Email!PS: You may be a tutorial system return true; } forward AtualizarLevel(); public AtualizarLevel() { for(new i=0; i<MAXPLAYERSJFS; ++i) { SetPlayerScore(i, Level[i]); } return true; }
PutuSuhartawan
Offline

Posts:120
Threads:52
Joined: Nov 2020
Reputation:1
Location: Indonesia
2021-05-14, 10:12 AM (This post was last modified: 2021-05-15, 05:56 PM by PutuSuhartawan.)
SOLUTION:
That's probably because the new scripter using the old includes as well. Please get the updated ones here:

https://github.com/pawn-lang/pawn-stdlib

The reason didn't remove the warning code system is because it really cares about the learning scripter. A lot of recommendations to make question before the compiler success. Now sir you can find a solution. As the best developer, the basics are usually based on the strength of the solutions created. And asking for a profit before build a new resolver system.


PROBLEM:

I often see Pragma script designs, but I never had the knowledge to relate to this #pragma system. Is this pragma really from pawn?
i just have source #pragma warning
This directive comes in two forms:
  • #pragma warning (enable

    Errors List

    From SA-MP Wiki

    Jump to: navigation, search

    [edit]

    General Pawn Error List

    This pages contains the most common errors and warnings produced by the pawn compiler when creating SA:MP scripts.

    When the compiler finds an error in a file, it outputs a message giving, in this order:

    • the name of the file
    • the line number were the compiler detected the error between parentheses, directly behind the filename
    • the error class (error, fatal error or warning)
    • an error number
    • a descriptive error message

    For example:

    hello.pwn(3) : error 001: expected token: ";", but found "{"

    Note: The error may be on the line ABOVE the line that is shown, since the compiler cannot always establish an error before having analyzed the complete expression.

    [edit]

    Error categories

    Errors are separated into three classes:

    [edit]

    Errors

    • Describe situations where the compiler is unable to generate appropriate code.
    • Errors messages are numbered from 1 to 99.

    [edit]

    Fatal errors

    • Fatal errors describe errors from which the compiler cannot recover.
    • Parsing is aborted.
    • Fatal error messages are numbered from 100 to 199.

    [edit]

    Warnings

    • Warnings are displayed for unintended compiler assumptions and common mistakes.
    • Warning messages are numbered from 200 to 299.

    [edit]

    Common Errors

    [edit]

    001: expected token

    A required token is missing.

    Example:

    error 001: expected token: ";", but found "return" main(){print("test")// This line is missing a semi-colon. That is the token it is expecting.return1; // The error states that it found "return", this is this line it is referring to,// as it is after the point at which the missing token (in this case the semi-colon) should be.}

    [edit]

    002: only a single statement (or expression) can follow each “case”

    Every case in a switch statement can hold exactly one statement.
    To put multiple statements in a case, enclose these statements
    between braces (which creates a compound statement).

    Example:

    error 002: only a single statement (or expression) can follow each "case" main(){switch(x){case0: print("hello"); print("hello"); }return1; }

    The above code also produces other warnings/errors:

    error 002: only a single statement (or expression) can follow each "case" warning 215: expression has no effect error 010: invalid function or declaration

    Fixed:

    main(){switch(x){case0: {print("hello"); print("hello"); }}return1; }

    [edit]

    004: function "x" is not implemented

    Most often caused by a missing brace in the function above.

    [edit]

    025: function heading differs from prototype

    This usually happen when new sa-mp version comes with new addition of argument to a function, like OnPlayerGiveDamage from 0.3x to 0.3z. The scripter must add "bodypart" argument to OnPlayerGiveDamage callback on their script.

    Caused by either the number of arguments or the argument name is different.

    Example:

    forward MyFunction(playerid);   public MyFunction(player, vehicleid)

    Fixed:

    forward MyFunction(playerid, vehicleid);   public MyFunction(playerid, vehicleid)

    [edit]

    035: argument type mismatch (argument x)

    An argument passed to a function is of the wrong 'type'. For example, passing a string where you should be passing an integer.

    Example:

    error 035: argument type mismatch (argument 1) Kick("playerid"); // We are passing a STRING, we should be passing an INTEGER

    Fixed:

    Kick(playerid);

    [edit]

    036: empty statement

    Caused by a rogue semicolon (), usually inadvertently placed behind an if-statement.

    [edit]

    046: unknown array size (variable x)

    For array assignment, the size of both arrays must be explicitly defined, also if they are passed as function arguments.

    Example:

    new string[];string = "hello";

    Fixed:

    new string[6];string = "hello";

    [edit]

    047: array sizes do not match, or destination array is too small

    For array assignment, the arrays on the left and the right side of the assignment operator must have the same number of dimensions. In addition:

    • for multi-dimensional arrays, both arrays must have the same size;
    • for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side.
    new destination[8]; new msg[] = "Hello World!";   destination = msg;

    In the above code, we try to fit 12 characters in an array that can only support 8. By increasing the array size of the destination, we can solve this. Note that a string also requires a null terminator so the total length of "Hello World!" plus the null terminator is, in fact, 13.

    new destination[13]; new msg[] = "Hello World!";   destination = msg;

    [edit]

    055: start of function body without function header

    This error usually indicates an erroneously placed semicolon at the end of the function header.

    [edit]

    Common Fatal Errors

    [edit]

    100: cannot read from file: "<file>"

    The compiler cannot find, or read from, the specified file. Make sure that the file you are trying to include is in the proper directory (default: <server directory>\pawno\include).

    Tip

    Image:Light_bulb_icon.png

    Multiple copies of pawno can lead to this problem. If this is the case, don't double click on a .pwn file to open it. Open your editor first, then open the file through the editor.

    [edit]

    Common Warnings

    [edit]

    202: number of arguments does not match definition

    The description of this warning is pretty self-explanatory. You've passed either too few or too many parameters to a function. This is usually an indication that the function is used incorrectly. Refer to the documentation to figure out the correct usage of the function.

    This usually happen on GetPlayerHealth function with PAWNO function auto completion as it confuses with the NPC GetPlayerHealth function that only has 'playerid' argument.

    Example:

    GetPlayerHealth(playerid);

    Fixed:

    newFloat:health; GetPlayerHealth(playerid, health);

    [edit]

    203: symbol is never used: "symbol"

    You have created a variable or a function, but you're not using it. Delete the variable or function if you don't intend to use it. This warning is relatively safe to ignore.

    The stock keyword will prevent this warning from being shown, as variables/functions with the stock keyword are not compiled unless they are used.

    stock SomeFunction(){// Blah}   // There will be no warning if this function is never used

    [edit]

    204: symbol is assigned a value that is never used: "symbol"

    Similar to the previous warning. You created a variable and assigned it a value, but you're not using that value anywhere. Use the variable, or delete it. This warning, too, is relatively safe to ignore.

    [edit]

    209: function should return a value

    You have created a function without a return value

    SomeFunction(){// Blah}

    but you used it to assign on variable or function argument,

    new result = SomeFunction(); // expected value = 1

    Fixed:

    SomeFunction(){// Blahreturn1; }

    [edit]

    211: possibly unintended assignment

    The assignment operator (=) was found in an if-statement, instead of the equality operator (==). If the assignment is intended, the expression must be wrapped in parentheses. Example:

    if(vehicle = GetPlayerVehicleID(playerid))// warningif(vehicle == GetPlayerVehicleID(playerid))// no warningif((vehicle = GetPlayerVehicleID(playerid)))// no warning; the value returned by the function will be assigned to the variable and the expression is then evaluated.

    [edit]

    213: tag mismatch

    A tag mismatch occurs when:

    • Assigning to a tagged variable a value that is untagged or that has a different tag
    • The expressions on either side of a binary operator have different tags
    • In a function call, passing an argument that is untagged or that has a different tag than what the function argument was defined with
    • Indexing an array which requires a tagged index with no tag or a wrong tag name

    Usually happen on a new variable created with missing tag on the required function such as Float:, Text3D:, Text:, etc. Example,

    Bad:new health; GetPlayerHealth(playerid, health);Good:newFloat:health; GetPlayerHealth(playerid, health);

    [edit]

    217: loose indentation

    The compiler will issue this warning if the code indentation is 'loose', example:

    Good:

    if(condition){ action(); result(); }

    Bad:

    if(condition){ action(); result(); }

    Indentation means to push (indent) text along from the left of the page (by pressing the TAB key). This is common practice in programming to make code easier to read. This warning also exists to avoid dangling-else problem.

    [edit]

    219: local variable "foo" shadows a variable at a preceding level

    A local variable, i.e. a variable that is created within a function or callback, cannot have the same name as a global variable, an enum specifier, a function, or a variable declared higher up in the same function. The compiler cannot tell which variable you're trying to alter.

    It is customary to prefix global variables with 'g' (e.g. gTeam). However, global variables should be avoided where possible.

    new team[MAX_PLAYERS]; // variable declared in the global scape   function(playerid){new team[MAX_PLAYERS]; // declared in the local scope, shadows the variable in the global scope, warning 219 team[playerid] = random(5); // which variable are we trying to update here?}

    [edit]

    225: unreachable code

    The indicated code will never run, because an instruction before (above) it causes a jump out of the function, out of a loop or elsewhere. Look for return, break, continue and goto instructions above the indicated line. Unreachable code can also be caused by an endless loop above the indicated line.

    Example:

    CMD:jetpack(playerid, params[]){#pragma unused paramsif(IsPlayerAdmin(playerid)){SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); return1; // jumps out the command}else{SendClientMessage(playerid, -1, "You are not admin!"); return1; // jumps out the command}SendClientMessage(playerid, -1, "You typed command /jp"); // this code is not reachable and will not run.}

    Fixed:

    CMD:jetpack(playerid, params[]){#pragma unused paramsif(IsPlayerAdmin(playerid)){SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); }else{SendClientMessage(playerid, -1, "You are not admin!"); }SendClientMessage(playerid, -1, "You typed command /jp"); // this code will run.return1; // jumps out the command}

    [edit]

    235: public function lacks forward declaration (symbol "symbol")

    Your public function is missing a forward declaration.

    Bad:

    public MyFunction(){// blah}

    Good:

    forward MyFunction();   public MyFunction(){// blah}

    [edit]

    External Links

    Categories: Documentation pop)
    Save or restore the list of currently disabled warnings.
    This can be used in conjuction with the previous form to toggle warnings
    for a piece of code:
    #pragma warning push
    #pragma warning disable XXX
    // some code here
    Put Error code after vairable option warning disable, Sample:

    Quote:From Radical solution, You can also:
    #pragma warning pophttps://github.com/compuphase/pawn/issues/24
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
What's the question? Most of these are documented in pawn-lang.pdf. `#pragma warning` is in the SA:MP and official compilers, but have different implementations since we forked.
Radical
Offline

Posts:149
Threads:21
Joined: Dec 2020
Reputation:16
(2021-05-14, 10:12 AM)PutuSuhartawan Wrote: SOLUTION:
Put Error code after vairable warning disable, Sample:

You can also:
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
The real question is why are you disabling so many warnings? They are important.
Radical
Offline

Posts:149
Threads:21
Joined: Dec 2020
Reputation:16
2021-05-14, 09:59 PM (This post was last modified: 2021-05-14, 10:02 PM by Radical.)
(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?  They are important.

It gets a lot of warnings when using Zeex compiler.
It's a resaon why I am disabled some warnings even those important.

Warnings:

239: literal array/string passed to a non-const parameter

214: possibly a "const" array
PutuSuhartawan
Offline

Posts:120
Threads:52
Joined: Nov 2020
Reputation:1
Location: Indonesia
(2021-05-14, 09:59 PM)Radical Wrote:
(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?  They are important.

It gets a lot of warnings when using Zeex compiler.
It's a resaon why I am disabled some warnings even those important.

Warnings:

239: literal array/string passed to a non-const parameter

214: possibly a "const" array

You are very intelligent. Respect ++

The reason I didn't display the warning code is because it really annoys the learning scripter. A lot of complaints came out during the compiler. But never realized to find a solution. As the best developer, the basics are usually based on the strength of the solutions created.
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
(2021-05-14, 09:59 PM)Radical Wrote:
(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?  They are important.

It gets a lot of warnings when using Zeex compiler.
It's a resaon why I am disabled some warnings even those important.

Warnings:

239: literal array/string passed to a non-const parameter

214: possibly a "const" array

That means your code is bad. Hiding issues doesn't solve them, it just means you're ignoring the bugs. I'm going to delete this topic soon, because you're advocating terrible coding practices. Like most things, we can't stop you doing them, but we can stop you spreading your terrible practices to other people and can help them learn correctly instead.
Radical
Offline

Posts:149
Threads:21
Joined: Dec 2020
Reputation:16
(2021-05-15, 09:57 AM)Y_Less Wrote:
(2021-05-14, 09:59 PM)Radical Wrote:
(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?  They are important.

It gets a lot of warnings when using Zeex compiler.
It's a resaon why I am disabled some warnings even those important.

Warnings:

239: literal array/string passed to a non-const parameter

214: possibly a "const" array

That means your code is bad.  Hiding issues doesn't solve them, it just means you're ignoring the bugs.  I'm going to delete this topic soon, because you're advocating terrible coding practices.  Like most things, we can't stop you doing them, but we can stop you spreading your terrible practices to other people and can help them learn correctly instead.

let me tell you before deleting this topic.

If I compile the following codes with Zeex compiler:


I get the following warnings:


Is my code bad?

There was another topic about this - https://burgershot.gg/showthread.php?tid=1556
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
That's probably because you're using the old includes as well. Get the updated ones here:

https://github.com/pawn-lang/pawn-stdlib
https://github.com/pawn-lang/samp-stdlib
PutuSuhartawan
Offline

Posts:120
Threads:52
Joined: Nov 2020
Reputation:1
Location: Indonesia
(2021-05-15, 02:02 PM)Y_Less Wrote: That's probably because you're using the old includes as well.  Get the updated ones here:

https://github.com/pawn-lang/pawn-stdlib

Thanks sir.
Pinch
Offline

Posts:391
Threads:19
Joined: Apr 2019
Reputation:22
Location: Belgrade, Serbia
And use regex to replace non-constants lol
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
How can a regex know which parameter should be `const` and which shouldn't?
Pinch
Offline

Posts:391
Threads:19
Joined: Apr 2019
Reputation:22
Location: Belgrade, Serbia
(2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't?
In most cases (at least for me) it did the job, it's much easier to remove const than add it on thousands of places where it isn't needed..
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
PutuSuhartawan
Offline

Posts:120
Threads:52
Joined: Nov 2020
Reputation:1
Location: Indonesia
2021-05-16, 05:10 PM (This post was last modified: 2021-05-16, 05:13 PM by PutuSuhartawan.)
(2021-05-16, 09:41 AM)Pinch Wrote:
(2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't?
In most cases (at least for me) it did the job, it's much easier to remove const than add it on thousands of places where it isn't needed..
How to use  regex? and why regex just better than const sir?
Y_Less
Offline

Posts:323
Threads:16
Joined: Feb 2019
Reputation:90
(2021-05-16, 09:41 AM)Pinch Wrote:
(2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't?
In most cases (at least for me) it did the job, it's much easier to remove const than add it on thousands of places where it isn't needed..

Yeah that's fair.
ZyZu.
Offline

Posts:17
Threads:2
Joined: Apr 2019
Reputation:0
Location: Canada
This is a very useful thread, please do not delete. I had the same issue with Zeex's Compiller! Warnings fixed after updating my include files.

List of Pawn Stars episodes

No.
overallNo. in
seasonTitleOriginal air date891"Evel Genius"April 4, 2011 (2011-04-04) Items appraised include a collection of 24 1960s rock concert posters for Buffalo Springfield, the Grateful Dead and the Rolling Stones; an optometrist's collection of 400 hand-blown glass prosthetic eyeballs dating from the 1890s – 1939; a 1977 Evel Knievel pinball machine that turns out to be worth much less than what Corey paid for it; and an autographed photo of Babe Ruth.902"Pablo Pawncasso"April 4, 2011 (2011-04-04) Items appraised include a copy of the first issue of Rolling Stone magazine; a pair of 2002 and 2008 gold-plated pants pendants awarded to Ohio State football players, the latter of which belonged to Doug Worthington; a pair of Picasso lithographs; a 1931 REO Flying Cloud hot rod with bullet-proof glass; and a 1980s coin-operated, computerized breathalyzer formerly used in a California bar.913"Sub for Sale"April 11, 2011 (2011-04-11) Items appraised include an officer's commission from the Revolutionary War; a miniature Model T Ford with a working motor; and a one-man midget submarine, whose purchase by Rick surprises both the Old Man and Corey.924"Missile Attack"April 11, 2011 (2011-04-11) Items appraised include the guidance system to a Cold War–era AIM-9 Sidewinder missile; an original Playboy bunny outfit; a 1986 Buick Regal that Chumlee takes an odd liking to; an 1850s–1860s carpenter's tool chest; and a 1980 Rubik's Cube sealed in its original package.935"Not on My Watch"April 18, 2011 (2011-04-18) Items appraised include a ConfederateCivil WarBowie knife known as an "Arkansas Toothpick"; a 1970 Honda Z600; a professionally restored, 1936 Rolex watch previously owned by Bernie Madoff; a boxing gym bell signed by Sonny Liston in 1970; and a 1957 Team Bowling Alley arcade game.946"Take a Seat"April 18, 2011 (2011-04-18) Items appraised include a chair from the U.S. Senate that belonged to Senator Pat McCarran; a photograph of a NASAGemini spacecraft launch signed by numerous astronauts including Neil Armstrong, Ed White, Buzz Aldrin, and Gus Grissom; a NASCAR driver's suit, c. 2002–03, that once belonged to Ryan Newman; and a collection of Asian wood carvings. To address the Old Man's habit of falling asleep within view of the showroom floor, Rick has a new office built for him.957"Pom Pom Pawn"April 25, 2011 (2011-04-25) Items appraised include a naval blunderbuss from the 17th century, a 1978 GMC motor home sponsored by Coca-Cola; a San Francisco 49ers cheerleader's 1989 Super Bowl ring; a photo of The Who signed by three of that band's members; and a Columbia Universityspeed reading machine course.968"Patton Pending"April 25, 2011 (2011-04-25) Items appraised include a signed George S. Patton photo album, whose seller is the grandson of the lieutenant assigned to photograph Patton for three months; an antique sterling silver travel kit; a pair of jockey boots autographed by Willie Shoemaker; a large collection of decanters; and a Kevlar bulletproof vest with two trauma plates.979"Spidey Cents"May 2, 2011 (2011-05-02) Items appraised include a piece of the heat shield from the Apollo 13 spacecraft; a 1973 Husqvarna CR 400 dirt bike whose restoration may prove to be a problem for Corey; a World War II Japanese non-commissioned officer's sword; Todd McFarlane's original artwork for page 25 of The Amazing Spider-Man #316 (June 1989); and a Curta calculator from the 1950s or 1960s.9810"Necessary Roughness"May 2, 2011 (2011-05-02) Items appraised include a collection of secret plans from the Normandy landings of World War II; a leather football helmet; a pair of saber bayonets from the Franco-Prussian War; and the head of a rare 1978 Stretch Serpent toy that Corey buys for $500, leading to a bet between him and an irritated Old Man over how much it is really worth.9911"Peacemaker"May 9, 2011 (2011-05-09) Items appraised include an early 1890s Colt .45 Peacemaker; a mid-1950s German Binz scooter; photos of a Japanese World War II Mitsubishi A6M Zero fighter plane shot down in the Aleutian Islands on July 10, 1942; a Tiger's eye gemstone skull; and Elvis Presley's medical records.10012"The Great Escape"May 9, 2011 (2011-05-09) Items appraised include an original Harry Houdinistraitjacket authenticated to have been used by him in a January 1, 1915 performance;[2] a loudspeaker from Ebbets Field in Brooklyn; a letter written and signed by Helen Keller; and a Carl Zeiss telescope from the late 19th century.10113"Broadsiding Lincoln"May 30, 2011 (2011-05-30) Items appraised include a John Wilkes BoothWanted poster printed on April 20, 1865; a 1930s arcade penny scale; an Air Force fighter pilot's G-suit and helmet worn by the seller's brother-in-law when he flew an F-18 during the Gulf War; and a 1930s Chicago police badge.10214"Sharpe Shooters"June 1, 2011 (2011-06-01) Rick and Sean Rich travel to Ashman's Pioneer Market in Fillmore, Utah to investigate a Civil War-era Gatling gun that just came on the market, as well as an 1863 Sharps carbine. Back in Las Vegas, items appraised at the Gold & Silver include a 1915 Ford Model T taxi and a vintage Charley Weaver Bartender toy.10315"Late Night Chum"June 6, 2011 (2011-06-06) Items appraised include World War II Adolf Hitler novelty matches; a Union Civil War cavalry jacket; a limited edition copy of The Illiterate Digest autographed by author Will Rogers; a porcelain-coated, 1940s Texaco sign; and an original Teddy Ruxpin and Grubby set. Rick assigns Chumlee to the night shift to fill in for someone who is sick.10416"Buy The Book"June 6, 2011 (2011-06-06) Items appraised include a Confederate "CS" belt buckle with a Minié ball bullet lodged in it; a first edition copy of Ernest Hemingway's For Whom the Bell Tolls, along with a framed autograph of the author, which George Stephanopoulos later purchases when he visits the shop; a 1932 LincolnRoadster, whose seller is initially reluctant to negotiate; and an antique bamboo fishing pole.10517"Over the Top"June 13, 2011 (2011-06-13) Items appraised include a quick-draw gun holster and blank-firing gun used on the TV series Gunsmoke in 1957 and 1958; a 1930s Steelcraft zeppelin pull toy; a World War I 5th Marine Regiment helmet; and an antique clock with four Morgan silver dollars and two Peace Dollars embedded in it. Rick hires a personal trainer and insists that he, Corey, the Old Man and Chumlee begin exercising every morning.10618"Honor Thy Father"June 13, 2011 (2011-06-13) Items appraised include the document signed by John Hancock with which he was inducted as a captain in the American militia; a framed, limited print photo of Jimi Hendrix by Gered Mankowitz that Corey wants to buy as a Father's Day gift for Rick; a 1934 steel Rickenbackerfrying pan guitar; and a 1960s Schwinn Sting-Ray Runabout that's been outfitted with a motor that Corey says needs to be removed in order for it to be sold as a collectible.10719"The Pick, the Pawn, and the Polish"July 11, 2011 (2011-07-11) The conclusion of a three-part crossover episode that began on American Pickers and continued on American Restoration. Rick asks Mike Wolfe and Frank Fritz to find a 1957 Chevrolet for his father's 70th birthday, and then meets with Rick Dale and Danny Koker to have it restored in time for the party. At the Gold & Silver, items appraised including a rare, 19th-century Imperial Protector 4 mm gun ring; a collection of approximately 50 original animation cels and their color guides that include Scooby-Doo, Fat Albert, The Smurfs, and Looney Tunes; and an unused ticket for a 1966Beatles concert at Shea Stadium.10820"Making Cents"July 18, 2011 (2011-07-18) Items appraised include a script of The Godfather purported signed by Al Pacino, but actually signed by Al Ruddy, a co-producer; a sterling silver Cartier bottle opener and a pair of caps; a vintage Excelsior accordion; a World War II Celestial Navigation trainer book; and a 1950s coin-operated Bally "Western Express" kiddie ride that Chumlee, working on a $1,000 spending limit from Rick, investigates in an attempt to prove himself.10921"Kings and McQueens"July 18, 2011 (2011-07-18) Items appraised include a 19th-century shotgun disguised as a cane; a 1940 Indian motorcycle that belonged to Steve McQueen; and a book printed by Benjamin Franklin.11022"Face the Music"July 25, 2011 (2011-07-25) Items appraised include a framed business card of John Wesley Hardin, authentication of which proves to be difficult; a 1950s Shopsmith woodworking machine; a jacket worn by actor Clint Walker in the 1964 movie Send Me No Flowers, which the seller says he purchased from Walker personally; and an early 1930s Gibson mandolin that an ambitious Chumlee buys for $1,500.11123"Off the Wall"July 25, 2011 (2011-07-25) Items appraised include an 1854 Civil War musket made in Harpers Ferry that Rick observes is loaded; replica Master Chief armor suit and rifle based on the video game Halo that was made by the seller; a 1950s Murray atomic missile pedal car; two liberty passes from the USS Arizona and USS Mississippi; and a collection of four vintage pawn shop movie posters that Rick wants to keep to decorate the shop, but for which Corey has other ideas.11224"Buffalo Bull"August 1, 2011 (2011-08-01) Items appraised include a chest filled with puppets and other memorabilia belonging to Buffalo Ben, who may have been a member of Buffalo Bill's Wild West Show; a phone booth from the 1950s or 1960s whose phone still functions; a collection of three vintage railroad lamps; and an unsigned copy of Ronald Reagan's 1928 high school yearbook and a signed letter that belonged to the seller's grandfather, who graduated with Reagan.11325"Cannons and Klingons"August 1, 2011 (2011-08-01) Items appraised include a military lighter, I.D. and scrapbook that belonged to the seller's grandfather, a writer/producer made who propaganda films for the U.S. government's atomic testing program in the 1950s; a shirt that belonged to Roy Rogers; a collection of 200 pieces of signed Star Trek memorabilia;[3] and an antique signal cannon used by Jonathan Higgins (John Hillerman) on the TV series Magnum, P.I..11426"Silent and Deadly"August 8, 2011 (2011-08-08) Items appraised include a piece of marble from Abraham Lincoln's tomb; a SchucoCharlie Chaplin wind-up doll; a 1970 Chevrolet Impala; an antique African sword from the Congo; and a rare copy of a limited edition of The Authorized Al, a biography of "Weird Al" Yankovic.11527"Weird Science"August 8, 2011 (2011-08-08) Items appraised include an antique Master Violet Ray #11 electrotherapy kit; a 19th-century, five-barrel, 37 mm Hotchkiss revolving cannon that fires one-pound projectiles, which Rick and Sean Rich investigate at Ashman's Pioneer Market in Utah; a 1973 Wurlitzer 1050 jukebox; a 50-year-old electric waffle iron; and an unused, early-20th-century hog oiler.11628"The Wright Stuff"August 15, 2011 (2011-08-15) Items appraised include a collection of letters and pilot licenses signed by Orville Wright; a 1930s Jennings Bronze Chief nickel slot machine; and a Model 1830 percussion musket from West Point Military Academy.11729"Out of Gas"August 15, 2011 (2011-08-15) Items appraised include an early-19th-century W. Child percussion dueling pistol; a hat once owned by Ronnie Van Zant of Lynyrd Skynyrd, who gave it to the seller in 1977; a first edition copy of David Copperfield; a 2000 Porsche Carrera 911 engine from a junkyard; and a vintage rotary dialpay phone that's been converted for home use.11830"The King's Bling"September 5, 2011 (2011-09-05) Items appraised include a collection of over 200 vintage Matchbox cars; a pair of World War I German Pickelhaube helmets; a trio of vintage Japanese arcade games (Dig Dug, Yie-Ar Kung Fu and Super Dodgeball); and a necklace owned by Elvis Presley that was given to the seller when she was a teenager.11931"Pipe Dreams"September 5, 2011 (2011-09-05) Items appraised include Robert E. Lee's silver spoon and Ulysses S. Grant's meerschaum pipe, which are brought in by the same seller; four volumes of Don Quixote; a vintage Metrotech metal detector; a U.S. Vietnam War-era practice bomb; and one of Secretariat's horseshoes.12032"High Stakes"September 12, 2011 (2011-09-12) Items appraised include an 1830s Knock percussion pistol; a 1958 Glastron Seaflight boat; a copy of Dracula signed by Bram Stoker that was purchased at a charity auction; a Penn State University1973 Orange Bowl championship ring; and a collection of antique billiard items, including ivory billiard balls.12133"Pirate's Booty"September 12, 2011 (2011-09-12) Items appraised include a 1787 carriage strongbox; a pirate ship parade float that Chumlee investigates; a collection of 17 one ounce silver art bars from the early 1970s; a World War II bomber jacket and flight mission logs that belonged to the seller's father, a B-17 pilot; and two Native American Kachina figurines made of sterling silver and turquoise.12234"Teacher's Pet"September 19, 2011 (2011-09-19) Items appraised include a World War II Sperrybombsight purchased at a garage sale for $10, which turns out to be not a bombsight, but a compensating mechanism from a B-26 or B-24 turret; a 1930s Dow Jonesstock ticker; two 1903 volumes of Charles Paul de Kock's novel, Le Barbier de Paris, hand-written and illustrated by John French Sloan on vellum in 1903; and a toy car vetted by Antwaun, after he asks Chumlee to teach him more about the pawn business.12335"Bugs Money"September 19, 2011 (2011-09-19) Items appraised include a golf putter owned by Dean Martin; a 1941 741 Indian motorcycle; a homemade suit of armor; a tin Louis Armstrong toy; and a Bugs Bunny 50th anniversary poster signed by Mel Blanc and Friz Freleng.12436"Security"September 26, 2011 (2011-09-26) Items appraised include a Civil War drum; a 1922 photographer's printing table; a Royal Riders motorcycle club uniform; and a 1652 sixpence coin. Antwaun, in preparation to take a few days off, attempts to train Chumlee on how to work the door in his absence.12537"Poker Night"September 26, 2011 (2011-09-26) Items appraised include a 1956 Winter Olympics competitor's stadium coat that was purchased at a New England thrift store for less than $15; a 1940s pinup poster by Earl MacPherson; a 19th-century gambling kit; and a 2002 Snoop Dogg doll in its package. The Old Man challenges the others to a game of poker.12638"Rick or Treat"October 24, 2011 (2011-10-24) Items appraised in this Halloween-themed episode include a 19th-century vampire-killing kit; a collection equipment used in paranormal investigations that includes several tape recorders, a full spectrum camera and a laser grid, whose sellers offer to use to search for paranormal activity around the shop; a 1940s keypunch machine whose seller was a punchcard accounting instructor in the early 1950s; and a 1983 Jabba the HuttPlay-Doh set. Also, Rick orders the entire staff to come in on Halloween in costume, with the best costume awarded $100 of in-store credit.

How to fix "EnableInput can only be specified on a Pawn for its Controller" error in output log

I'm creating a weapon system for my third person shooter project and I'm having some problems getting input to the gun.

With the way I have set up my classes, I have ACharacter parented player classes and APawn parented weapon classes. Right now, I'm trying to set up some key binds (fire, alt-fire, reload) to the weapon that the player is holding, but I'm getting an error. I think my code is almost there, I'm just having problems with which controller I need to be getting input from.

My player class is just a basic third-person character class. I couldn't create an instance of the weapon as a component in the player class, so I used SpawnActor<>() and just attached the weapon instance to the player instance when the game starts. I have created a parent class called ALTWeapon that parents all my weapon classes and I have a subclass variable called PlayerWeaponAtSpawnClass that holds the ALTWeapon child class that I want to spawn on the player. I'm including my code for the player here and I've omitted some code that doesn't need to be included in this post.

Moving into the code file for the spawned weapon, I have bound the fire and reload input events just like in the player class. I'll include that code here.

Now, when I compile and then hit play, I get this error message in the output log for Unreal.

LogPawn: Error: EnableInput can only be specified on a Pawn for its Controller

From my own research, I've tried to get the controller of the player holding the gun through casting and such but I didn't have any luck there. I looked into the definition of the EnableInput function and found some useful info, but I don't know what to do with it. I'll include the function definition here.

If anyone has some insight on how to fix this, I'd really appreciate it. Thanks!

asked Jan 22, 2020 at 10:15

user avatar
pat-lawrepat-lawre

7722 silver badges1212 bronze badges

error 217 pawno

0 Comments

Leave a Comment