Anyone can help me Please ?!
#1

I got this after compile
Код:
C:\Users\user\Desktop\samp03csvr_R2-2_win32\gamemodes\lvdm.pwn(956) : error 030: compound statement not closed at the end of file (started at line 936)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
this is the script
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar = GetPlayerVehicleID(playerid);
	if(newcar == dr1)  // pui numele care l-ai pus la new si la masina respectiva,in caz ca adaugi alta
	{
        new PlayerName[MAX_PLAYER_NAME];
        new playerState = GetPlayerState(playerid);
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(strcmp(PlayerName, "dR.", true) == 0) // aici schimbi in numele jucatorului caruia vrei sa-i dai masina
        {
            SendClientMessage(playerid, 0xFF0000FF,"* E masina ta dR ! Bucura-te de Scriptul lui EugenEBv.");  //mesajul care apare cand intrii in masina
        }
        else if (playerState == PLAYER_STATE_PASSENGER)
        {
            SendClientMessage(playerid, 0xFF0000FF,"* Ai intrat in masina lui dR..");  // mesajul care apare pasagerilor
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            new Float:cx, Float:cy, Float:cz;
	        GetPlayerPos(playerid, cx, cy, cz);
	        SetPlayerPos(playerid, cx,  cy, cz);
            SendClientMessage(playerid, COLOR_RED,"* Aceasta masina ii apartine lui dR."); // mesajul care apare daca incearca cineva sa intre ca sofer ,dar nu este masina lui
	return 1;
}
Reply
#2

You forgot 2 brackets.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar = GetPlayerVehicleID(playerid);
    if(newcar == dr1)  // pui numele care l-ai pus la new si la masina respectiva,in caz ca adaugi alta
    {
        new PlayerName[MAX_PLAYER_NAME];
        new playerState = GetPlayerState(playerid);
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(strcmp(PlayerName, "dR.", true) == 0) // aici schimbi in numele jucatorului caruia vrei sa-i dai masina
        {
            SendClientMessage(playerid, 0xFF0000FF,"* E masina ta dR ! Bucura-te de Scriptul lui EugenEBv.");  //mesajul care apare cand intrii in masina
        }
        else if (playerState == PLAYER_STATE_PASSENGER)
        {
            SendClientMessage(playerid, 0xFF0000FF,"* Ai intrat in masina lui dR..");  // mesajul care apare pasagerilor
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx,  cy, cz);
            SendClientMessage(playerid, COLOR_RED,"* Aceasta masina ii apartine lui dR."); // mesajul care apare daca incearca cineva sa intre ca sofer ,dar nu este masina lui
        } // 1
    } // 2
    return 1;
}
Reply
#3

No ..this is not working..same problem
Код:
C:\Users\eBv\Desktop\samp03csvr_R2-2_win32\gamemodes\lvdm.pwn(957) : error 030: compound statement not closed at the end of file (started at line 933)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
but this time it is at 933 .. 933 is at
Код:
    new newcar = GetPlayerVehicleID(playerid);
Reply
#4

Sorry, I didn't noticed it before. However I don't know if that was the problem, the code compiles fine to me.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar; // <
    newcar = GetPlayerVehicleID(playerid); // <
    if(newcar == dr1)  // pui numele care l-ai pus la new si la masina respectiva,in caz ca adaugi alta
    {
        new PlayerName[MAX_PLAYER_NAME];
        new playerState = GetPlayerState(playerid);
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(strcmp(PlayerName, "dR.", true) == 0) // aici schimbi in numele jucatorului caruia vrei sa-i dai masina
        {
            SendClientMessage(playerid, 0xFF0000FF,"* E masina ta dR ! Bucura-te de Scriptul lui EugenEBv.");  //mesajul care apare cand intrii in masina
        }
        else if (playerState == PLAYER_STATE_PASSENGER)
        {
            SendClientMessage(playerid, 0xFF0000FF,"* Ai intrat in masina lui dR..");  // mesajul care apare pasagerilor
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx,  cy, cz);
            SendClientMessage(playerid, COLOR_RED,"* Aceasta masina ii apartine lui dR."); // mesajul care apare daca incearca cineva sa intre ca sofer ,dar nu este masina lui
        } // 1
    } // 2
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)