Jump to content

Question

Posted

warning 203: symbol is never used: "antisqlinjection"

Ce pot face ? imi pica sv si nu merge sa adaug asta

 

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

Bine, hai sa-ti arat cod-ul :
La inceput-ul gamemode ului jos de Include-uri pui asta:

static const antisqlinjection[][] = {
    "'",
    "#",
    "`",
    "%"
};

Apoi mergi la OnDialogResponse si pui asta:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[700];
    new adv[MAX_PLAYER_NAME];
	for(new i; i < sizeof(antisqlinjection); i++)
    {
        if(strfind(inputtext, antisqlinjection[i], true) != -1)
        {
            GetPlayerName(playerid, adv, sizeof(adv));
			format(string,sizeof(string),"Server protected by NumeServer (Numele tau).",adv);
		    SCM(playerid, COLOR_YELLOW, string);
            return 1;
        }
	}

Daca ti-a fost de ajutor poti lasa un Like
Acel } nu este pus bine (eu l-am pus bn da systemu nu =]) il pui cu un tab mai in stanga decat penultimul

Edited by LucaAdv.
  • Thanks 2

GameMode Edited: gamemode

Servicii Scripting:

Contact:
Email: [email protected]
Discord: LucaAdv //  LHS#9084

 

  • 0
Posted
Acum 37 minute, LucaAdv. a spus:

Bine, hai sa-ti arat cod-ul :
La inceput-ul gamemode ului jos de Include-uri pui asta:


static const antisqlinjection[][] = {
    "'",
    "#",
    "`",
    "%"
};

Apoi mergi la OnDialogResponse si pui asta:


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[700];
    new adv[MAX_PLAYER_NAME];
	for(new i; i < sizeof(antisqlinjection); i++)
    {
        if(strfind(inputtext, antisqlinjection[i], true) != -1)
        {
            GetPlayerName(playerid, adv, sizeof(adv));
			format(string,sizeof(string),"Server protected by NumeServer (Numele tau).",adv);
		    SCM(playerid, COLOR_YELLOW, string);
            return 1;
        }
	}

Daca ti-a fost de ajutor poti lasa un Like
Acel } nu este pus bine (eu l-am pus bn da systemu nu =]) il pui cu un tab mai in stanga decat penultimul

C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42135) : warning 217: loose indentation
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42135) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42135) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : error 001: expected token: ";", but found "new"
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
 

  • 0
Posted (edited)
Acum 4 minute, LucaAdv. a spus:

Da liniile?

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    new string[700];

C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : warning 217: loose indentation
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : error 001: expected token: ";", but found "new"
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : warning 217: loose indentation
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
 

 

Edited by Iulian2
gre
  • 0
Posted
Acum 8 minute, LucaAdv. a spus:

si la sfarsit ai pus } ? cum trebe?

am facut-o , mai am o problema iti dau mesaj privat?

  • 0
Posted

 

Acum 1 oră, Iulian2 a spus:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    new string[700];

C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : warning 217: loose indentation
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42136) : error 029: invalid expression, assumed zero
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : error 001: expected token: ";", but found "new"
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : warning 217: loose indentation
C:\Users\Ionut\Desktop\Bugged\gamemodes\bugged.pwn(42137) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
 

 

salut, încearcă asa și nu o sa mai ai probleme adaugă asta la 

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(strlen(inputtext) >= 1) {
		if(strfind(inputtext, "%", true) != -1  || strfind(inputtext, "#", true) != -1 || strfind(inputtext, "`", true) != -1 || strfind(inputtext, "'", true) != -1) return SCM(playerid, COLOR_CLIENT, "Caractere invalide!");
      
    }
    return 1;
)

dacă ți-am fost de folos lasă și tu un mulțumesc!

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.