#1

Getting some errors on this line
Код:
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_debug.inc(277) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_debug.inc(339) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_debug.inc(344) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_amx.inc(454) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_amx.inc(904) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_amx.inc(926) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_utils.inc(246) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_utils.inc(266) : warning 219: local variable "line" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_utils.inc(369) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_utils.inc(396) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_utils.inc(475) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_malloc.inc(488) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_malloc.inc(613) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_malloc.inc(899) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_malloc.inc(929) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(265) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(312) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(511) : warning 219: local variable "ignore" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(606) : warning 219: local variable "p3" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(1000) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_inline.inc(1210) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_ini.inc(469) : warning 219: local variable "line" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_ini.inc(1192) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Kimo CompuTeR\Downloads\New folder\pawno\include\YSI\y_ini.inc(1232) : warning 219: local variable "line" shadows a variable at a preceding level
OSF_config.pwn(1718) : warning 216: nested comment
OSF_houses.pwn(13) : error 021: symbol already defined: "FALSE"
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(4478) : error 017: undefined symbol "sstr"
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(4506) : error 017: undefined symbol "stt"
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(4653) : error 025: function heading differs from prototype
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(4890) : error 025: function heading differs from prototype
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(25418) : warning 217: loose indentation
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31128) : warning 217: loose indentation
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31897) : error 010: invalid function or declaration
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31898) : error 010: invalid function or declaration
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31917) : error 017: undefined symbol "str1"
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31917) : error 017: undefined symbol "str1"
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31917) : error 029: invalid expression, assumed zero
C:\Users\Kimo CompuTeR\Downloads\New folder\gamemodes\OSF.pwn(31917) : fatal error 107: too many error messages on one line
Код:
	if(isCbug[playerid] == 1)
	{
		if(GetPlayerWeapon(playerid) == 24)
		{
		    if(GetPlayerAmmo(playerid) == 7 && PRESSED(KEY_FIRE))
			{
			    ccount[0][playerid] = GetTickCount();
                disparou[playerid] = true;
			}
			else if(RELEASED(KEY_FIRE))
			{
			    if(GetPlayerAmmo(playerid) == 0)
			    {
					ccount[1][playerid] = GetTickCount();
					ccount[2][playerid] = ccount[1][playerid] - ccount[0][playerid];
					ccount[3][playerid] = ccount[2][playerid] / 1000;
					disparou[playerid] = false;
					format(str, sizeof(str), "~r~C-Bug Time~w~:~n~%0.4f~y~s", ccount[3][playerid]);
					GameTextForPlayer(playerid, sstr, 2000, 4);
					format(str, sizeof(str), "{FF0000}C-Bug Time{FFFFFF}: %0.4f{FFFF00}s", ccount[3][playerid]);
					Msg(playerid, -1, str);

					// Y_INI
                    INI_ParseFile(fileToWrite,"ini_%s_%s");
					if (ccount[3][playerid] < tops[4])
					{
					    new INI:iniFile = INI_Open(fileToWrite);
                        new nick[MAX_PLAYER_NAME+1];
                        format(nick, sizeof(nick), GetPlayerN(playerid));

                        if (ccount[3][playerid] < tops[0])
                        {
                            INI_SetTag(iniFile, "tempos");
							INI_WriteFloat(iniFile, "1", ccount[3][playerid], 4);
							INI_WriteFloat(iniFile, "2", tops[0], 4);
							INI_WriteFloat(iniFile, "3", tops[1], 4);
							INI_WriteFloat(iniFile, "4", tops[2], 4);
							INI_WriteFloat(iniFile, "5", tops[3], 4);
                            INI_SetTag(iniFile, "jogadores");
							INI_WriteString(iniFile, "j1", nick);
							INI_WriteString(iniFile, "j2", jogtops[0]);
							INI_WriteString(iniFile, "j3", jogtops[1]);
							INI_WriteString(iniFile, "j4", jogtops[2]);
							INI_WriteString(iniFile, "j5", jogtops[3]);

                            format(str, sizeof(str), "[CBug-Time] {00FF00}%s{FFFFFF} is now in {00FF00}1st place{FFFFFF} with a time of {00FF00}%0.4f{FFFFFF} seconds!", nick, ccount[3][playerid]);
			    			MsgAll(0xFF0000FF, stt);
			    			INI_Close(iniFile);
						}
          				else if (ccount[3][playerid] < tops[1])
                        {
                            INI_SetTag(iniFile, "tempos");
							INI_WriteFloat(iniFile, "2", ccount[3][playerid], 4);
							INI_WriteFloat(iniFile, "3", tops[1], 4);
							INI_WriteFloat(iniFile, "4", tops[2], 4);
							INI_WriteFloat(iniFile, "5", tops[3], 4);
	                        INI_SetTag(iniFile, "jogadores");
							INI_WriteString(iniFile, "j2", nick);
							INI_WriteString(iniFile, "j3", jogtops[1]);
							INI_WriteString(iniFile, "j4", jogtops[2]);
							INI_WriteString(iniFile, "j5", jogtops[3]);

							format(str, sizeof(str), "[CBug-Time] {00FF00}%s{FFFFFF} is now in {00FF00}2nd place{FFFFFF} with a time of {00FF00}%0.4f{FFFFFF} seconds!", nick, ccount[3][playerid]);
				    		MsgAll(0xFF0000FF, str);
				    		INI_Close(iniFile);
						}
      					else if (ccount[3][playerid] < tops[2])
                        {
                        	INI_SetTag(iniFile, "tempos");
							INI_WriteFloat(iniFile, "3", ccount[3][playerid], 4);
							INI_WriteFloat(iniFile, "4", tops[2], 4);
							INI_WriteFloat(iniFile, "5", tops[3], 4);
                            INI_SetTag(iniFile, "jogadores");
							INI_WriteString(iniFile, "j3", nick);
							INI_WriteString(iniFile, "j4", jogtops[2]);
							INI_WriteString(iniFile, "j5", jogtops[3]);

							format(str, sizeof(str), "[CBug-Time] {00FF00}%s{FFFFFF} is now in {00FF00}3rd place{FFFFFF} with a time of {00FF00}%0.4f{FFFFFF} seconds!", nick, ccount[3][playerid]);
					    	MsgAll(0xFF0000FF, str);
					    	INI_Close(iniFile);
						}
						else if (ccount[3][playerid] < tops[3])
                        {
                            INI_SetTag(iniFile, "tempos");
							INI_WriteFloat(iniFile, "4", ccount[3][playerid], 4);
							INI_WriteFloat(iniFile, "5", tops[3], 4);
                            INI_SetTag(iniFile, "jogadores");
							INI_WriteString(iniFile, "j4", nick);
							INI_WriteString(iniFile, "j5", jogtops[3]);

							format(str, sizeof(str), "[CBug-Time] {00FF00}%s{FFFFFF} is now in {00FF00}4th place{FFFFFF} with a time of {00FF00}%0.4f{FFFFFF} seconds!", nick, ccount[3][playerid]);
						    MsgAll(0xFF0000FF, str);
						    INI_Close(iniFile);
						}
						else
						{
							INI_SetTag(iniFile, "tempos");
							INI_WriteFloat(iniFile, "5", ccount[3][playerid], 4);
	                        INI_SetTag(iniFile, "jogadores");
							INI_WriteString(iniFile, "j5", nick);

							format(str, sizeof(str), "[CBug-Time] {00FF00}%s{FFFFFF} is now in {00FF00}5th place{FFFFFF} with a time of {00FF00}%0.4f{FFFFFF} seconds!", nick, ccount[3][playerid]);
							MsgAll(0xFF0000FF, str);

							INI_Close(iniFile);
						}
					}

					// Y_INI
					ccount[0][playerid] = 0; ccount[1][playerid] = 0; ccount[2][playerid] = 0; ccount[3][playerid] = 0;
					WaitReset(playerid);
				}
			}

		}
	}
	return true;
}
Reply
#2

It means exactly as it's saying... tmp, line, p3 and ignore are already defined, and when the includes are being included they're finding them there.

Should change those variables to something more meaningful, and change all references to them inside the functions (in your gamemode) they are used in.


Nested comment is a bad error as it means your comments are being used incorrectly.


Are you trying to make a modular script? In which case, all of these errors could be from including includes again, when you only need to include them once.

You shouldn't need to reinclude the includes on each module.
Reply
#3

That a cbug script which i am trying to add into my gamemode and i don't know how to fix those errors.
Reply
#4

Don't just copy-paste it in, as that's not how it works.

You need to use it as a filterscript if it's designed that way, or learn how to script so you know what needs to be done.
Reply
#5

Can you please stop posting here if you are not helping me ? thanks.
Reply
#6

Quote:
Originally Posted by Dangjai
Посмотреть сообщение
Can you please stop posting here if you are not helping me ? thanks.
He already answered and told you a way to fix your errors, you should do as he said before and check your code since
str and the other variables are already defined somewhere.
Reply
#7

Quote:
Originally Posted by Flamehaze7
Посмотреть сообщение
He already answered and told you a way to fix your errors, you should do as he said before and check your code since
str and the other variables are already defined somewhere.
What is the examples of the names to change to ?
Reply
#8

Quote:
Originally Posted by Dangjai
Посмотреть сообщение
What is the examples of the names to change to ?
Anything other than the ones that are causing errors.


Even in saying this though, simply putting everything in the same file, and naming every variable different, doesn't guarantee it won't bug out in other ways.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)