Error "}"
#1

Hello guys..
I have gotten this error that I need help with

These are the errors:
Код:
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3667) : error 010: invalid function or declaration
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3672) : error 054: unmatched closing brace ("}")
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3677) : error 010: invalid function or declaration
Lines 3667 - 3677
Код:
    if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
    {
        FalseBan[playerid] = 0;
        SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
    	SpawnChar(playerid);
	}
   	GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3);
	TogglePlayerControllable(playerid, 0);
	SetPlayerVirtualWorld(playerid, 0);
	SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
	return 1;
}
Thank you!
Reply
#2

Isn't it obvious?

pawn Код:
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
    {
        FalseBan[playerid] = 0;
        SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
        SpawnChar(playerid);
    GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3);
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
    return 1;
}
Reply
#3

It is because of the } Which you wrote in the code without any need.
pawn Код:
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
    {
        FalseBan[playerid] = 0;
        SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
        SpawnChar(playerid);
    GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3);
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
      }
    return 1;
}
Reply
#4

C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3656) : error 010: invalid function or declaration
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3661) : error 021: symbol already defined: "GameTextForPlayer"
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3665) : error 010: invalid function or declaration
Reply
#5

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3656) : error 010: invalid function or declaration
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3661) : error 021: symbol already defined: "GameTextForPlayer"
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3665) : error 010: invalid function or declaration
Can you show us each line 3656, line 3661, line 3665, every line please type a comment beside it with the number for example // line 3656 So we can understand.
Reply
#6

CODE:
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3634) : error 010: invalid function or declaration
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3639) : error 021: symbol already defined: "GameTextForPlayer"
C:\Users\USER\Desktop\War\gamemodes\WW-RP.pwn(3643) : error 010: invalid function or declaration

Lines 3634 - 3644:
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn]) // Line 3634
{
FalseBan[playerid] = 0;
SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
SpawnChar(playerid);
GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3); // Line 3639
TogglePlayerControllable(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
return 1; // Lines 3643
}
Reply
#7

pawn Код:
if(PlayerInfo[playerid][pLoggedIn] == 1 && PlayerInfo[playerid][pSpawn] == 1) // Line 3634
{
FalseBan[playerid] = 0;
SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
SpawnChar(playerid);
GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3); // Line 3639
TogglePlayerControllable(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
}
return 1; // Lines 3643
}
Reply
#8

I still get the same error..
Reply
#9

Код:
public OnPlayerConnect(playerid)
{
       if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
             {
                       FalseBan[playerid] = 0;
                       SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
    	               SpawnChar(playerid);
                       GameTextForPlayer(playerid, "~w~Character Loading...", 3500, 3);
	               TogglePlayerControllable(playerid, 0);
	               SetPlayerVirtualWorld(playerid, 0);
	               SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
             }
             return 1;
}
its will be something like that probably
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)