Script Help!
#1

Hello
I have a problem..

Код:
}
}
    if(strcmp(cmdtext, "/tower", true) == 0)
    {
        SetPlayerCameraPos(playerid, 2618.3955, 956.4876, 749.8432);
        SendClientMessage(playerid, 0x21DD00FF, "You have teleported to TOWER!!!.");
        return 1;
        }
	return 0;
}
and it give's me this
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1627) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1633) : warning 217: loose indentation
When i fix it and type /tower ingame it won't work!
so please can you tell me what's the problem?
Reply
#2

show us the warnings lines, simply its like (your code not organized)
Reply
#3

Did you at least tried to search for that error?
Reply
#4

Quote:
Originally Posted by mati233
Посмотреть сообщение
WRONG

pawn Код:
if(strcmp(cmdtext, "/tower", true) == 0)
    {
        SetPlayerCameraPos(playerid, 2618.3955, 956.4876, 749.8432);
        SendClientMessage(playerid, 0x21DD00FF, "You have teleported to TOWER!!!.");
        return 1;
        }
    return 0;
}

CORRECT


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/tower", cmdtext, true, 10) == 0)
    {
        SetPlayerCameraPos(playerid, 2618.3955, 956.4876, 749.8432);
        SendClientMessage(playerid, 0x21DD00FF, "You have teleported to TOWER!!!.");
        return 1;
    }
    return 0;
}
Reply
#5

You missed your...BRACKETS!
Reply
#6

Quote:

show us the warnings lines, simply its like (your code not organized)

C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1627) : warning 217: loose indentation = SetPlayerCameraPos(playerid, 2618.3955, 956.4876, 749.8432);
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1633) : warning 217: loose indentation = return 0;
Reply
#7

Quote:
Originally Posted by irajninger
Посмотреть сообщение
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1627) : warning 217: loose indentation = SetPlayerCameraPos(playerid, 2618.3955, 956.4876, 749.8432);
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\mygamemode.pwn(1633) : warning 217: loose indentation = return 0;
did you just ignore my post ? i show you your wrong code and how it shout be
Reply
#8

Thank you all for your help!!




EDITorry i didn't ignore your post i only made this earlier post sorry!
Reply
#9

Put

pawn Код:
#pragma tabsize 0
at the top your your script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)