Jump to content
  • 0

redundant test: constant expression is non-zero


Jimmi

Question

Problema intalnita (descriere):Am incercat sa fac o comanda pe zcmd si m-am ales cu alte erori.Nu am folosit parametrii sscanf pentru ca stiam ca se folosesc la comenzile foarte mari.
Ero(area / rile) / warning-(ul / urile):

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 206: redundant test: constant expression is non-zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 028: invalid subscript (not an array or too many subscripts): "carinfo"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : warning 215: expression has no effect
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 001: expected token: ";", but found "]"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 029: invalid expression, assumed zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da si tot da erori.

//========================================[CMD /VHELP]========================================================//
CMD:vhelp(playerid, params[])
{
    new string[256], carkey, carinfo;
    if(IsPlayerConnected(playerid))
        SendClientMessage(playerid, COLOR_RED,"----------------------------------[Masini Personale]----------------------------------");
                if(vOwner != 999 && vOwner != 0)
                {
                    format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey][cDescription], carinfo[carkey][cValue], carinfo[carkey][cColorOne], carinfo[carkey][cColorTwo], carinfo[carkey][vLocked], carinfo[carkey][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                 if(vOwner2 != 999 && vOwner2 != 0)
                {
                    format(string, sizeof(string), " 2| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey2][cDescription], carinfo[carkey2][cValue], carinfo[carkey2][cColorOne], carinfo[carkey2][cColorTwo], carinfo[carkey2][vLocked], carinfo[carkey2][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                if(vOwner3 != 999 && vOwner3 != 0)
                {
                    format(string, sizeof(string), " 3| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey3][cDescription], carinfo[carkey3][cValue], carinfo[carkey3][cColorOne], carinfo[carkey3][cColorTwo], carinfo[carkey3][vLocked], carinfo[carkey3][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
       }
       return 1;
    }
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Care e linia 

26977

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

Link to comment
Share on other sites

  • 0

asta

					format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey][cDescription], carinfo[carkey][cValue], carinfo[carkey][cColorOne], carinfo[carkey][cColorTwo], carinfo[carkey][vLocked], carinfo[carkey][cNum],);

 

Link to comment
Share on other sites

  • 0

asta

					format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey][cDescription], carinfo[carkey][cValue], carinfo[carkey][cColorOne], carinfo[carkey][cColorTwo], carinfo[carkey][vLocked], carinfo[carkey][cNum],);

 

ai o virgula la final in plus.. inlocuieste cu ce t-am pus mai jos, si vezi ca mai un rand cu aceeasi problema. Stergi si de acolo ultima virgula.

 

format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey][cDescription], carinfo[carkey][cValue], carinfo[carkey][cColorOne], carinfo[carkey][cColorTwo], carinfo[carkey][vLocked], carinfo[carkey][cNum]);

 

Nu mai deschideti in pu*a mea servere de SA:MP !

Jucati-va pe cele care sunt !   Sunt suficiente !

Reguli de bun simt:

1. Nu faceti reclama unde nu trebuie !

2. Nu injurati ca la usa cortului !

3. Daca esti analfabeti, taci din gura !

4. Nu abuza de 'scuze', 'din greseala' !

 

My work ::: http://pastebin.com/VRNRcaAs

Link to comment
Share on other sites

  • 0

Am pus tot la fel la erori:

CMD:vhelp(playerid, params[])
{
	new string[256], carkey, carinfo;
	if(IsPlayerConnected(playerid))
		SendClientMessage(playerid, COLOR_RED,"----------------------------------[Masini Personale]----------------------------------");
    			if(vOwner != 999 && vOwner != 0)
    			{
					format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey][cDescription], carinfo[carkey][cValue], carinfo[carkey][cColorOne], carinfo[carkey][cColorTwo], carinfo[carkey][vLocked], carinfo[carkey][cNum);
					SendClientMessage(playerid, COLOR_GRAD5,string);
				}
			 	if(vOwner2 != 999 && vOwner2 != 0)
				{
					format(string, sizeof(string), " 2| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey2][cDescription], carinfo[carkey2][cValue], carinfo[carkey2][cColorOne], carinfo[carkey2][cColorTwo], carinfo[carkey2][vLocked], carinfo[carkey2][cNum]);
					SendClientMessage(playerid, COLOR_GRAD5,string);
				}
				if(vOwner3 != 999 && vOwner3 != 0)
				{
					format(string, sizeof(string), " 3| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", carinfo[carkey3][cDescription], carinfo[carkey3][cValue], carinfo[carkey3][cColorOne], carinfo[carkey3][cColorTwo], carinfo[carkey3][vLocked], carinfo[carkey3][cNum]);
					SendClientMessage(playerid, COLOR_GRAD5,string);
       }
       return 1;
    }

si erorile

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26975) : warning 206: redundant test: constant expression is non-zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 028: invalid subscript (not an array or too many subscripts): "carinfo"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : warning 215: expression has no effect
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 001: expected token: ";", but found "]"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : error 029: invalid expression, assumed zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(26977) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

4 Errors.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.