PDA

View Full Version : Warnings


Stanford
08/03/2013, 01:14 PM
Hello there, I've got some warnings and I don't know how to deal with them, can someone help me?

Here are the warnings:

C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(8899) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(28708) : warning 217: loose indentation

C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(17629) : warning 213: tag mismatch

Here are the lines for each warning:

8888-8999:[For the strings warning] // BUY LOCK
if(dialogid == MAIN_LOCK_DIALOG)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pCash] >= 5000)
{
new string[256];

28706-28708: [For loose warning]:

SendClientMessage(playerid,COLOR_GREY," You are not at any Locks Store.");
}
return 1;
}

17629 [Mistach warning]:

if(strcmp(playername,CarInfo[i][vOwner],true)==0)

Help me and get a reputation

Stanford
08/03/2013, 01:22 PM
any help?

zxc1
08/03/2013, 01:25 PM
C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(8899) : warning 219: local variable "string" shadows a variable at a preceding level String already defined, rename it.

C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(28708) : warning 217: loose indentation Just press TAB before the function.

C:\Users\Jameel\Desktop\STRUCTURE\San Andreas Roleplay\gamemodes\sarp.pwn(17629) : warning 213: tag mismatch -> if(strcmp(playername,CarInfo[i][vOwner],true,strlen(playername))==0)

RajatPawar
08/03/2013, 01:27 PM
I am not doing it for the rep, and stop offering it already.

1) Reduce the size to 128. Name it something else. You used the same name for something else already.
2) http://forum.sa-mp.com/showthread.php?t=256961
3) Please post the declaration lines !

Stanford
08/03/2013, 01:31 PM
+REP'ed, but the mistatch didn't work

Stanford
08/03/2013, 01:46 PM
Any help? the mistatch doesn't work