PDA

View Full Version : Help please ! error 030


neCk
14/11/2011, 07:50 AM
{
if(LoadCP[playerid] == 1)
{
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Entered!",3000,3);
SetPlayerCheckpoint(playerid,TInfo[playerid][Lastx],TInfo[playerid][Lasty],TInfo[playerid][Lastz],4.0);
LoadCP[playerid] = 2;
}
else if(LoadCP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Exited!",3000,3);
LoadCP[playerid] = 0;
SendFMessage(playerid, red,"[TAXI] "lgreen2"You have earned "lblue"%i "lgreen2"for transporting passangers.",TInfo[playerid][Pay]);
GivePlayerMoney(playerid,TInfo[playerid][Pay]);
PInfo[playerid][Missionspassed]++;
SetPlayerScore(playerid,PInfo[playerid][Missionspassed]);
IsPlayerInMission[playerid] = 0;
TogglePlayerAllDynamicCPs(playerid, 1);
PlaySound(playerid,1057);
}
return 1;


error 030: compound statement not closed at the end of file (started at line 4488)

what's wrong..?

Stigg
14/11/2011, 08:00 AM
Try:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(LoadCP[playerid] == 1)
{
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Entered!",3000,3);
SetPlayerCheckpoint(playerid,TInfo[playerid][Lastx],TInfo[playerid][Lasty],TInfo[playerid][Lastz],4.0);
LoadCP[playerid] = 2;
}
else if(LoadCP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Exited!",3000,3);
LoadCP[playerid] = 0;
SendFMessage(playerid, red,"[TAXI] "lgreen2"You have earned "lblue"%i "lgreen2"for transporting passangers.",TInfo[playerid][Pay]);
GivePlayerMoney(playerid,TInfo[playerid][Pay]);
PInfo[playerid][Missionspassed]++;
SetPlayerScore(playerid,PInfo[playerid][Missionspassed]);
IsPlayerInMission[playerid] = 0;
TogglePlayerAllDynamicCPs(playerid, 1);
PlaySound(playerid,1057);
}
return 1;
}//missing closing brace

neCk
14/11/2011, 08:15 AM
now it gives me this

error 021: symbol already defined: "Streamer_OnPlayerEnterCP"

Stigg
14/11/2011, 08:33 AM
Can we see all of your checkpoint code. It seems your using:
public OnPlayerEnterCheckpoint(playerid)
twice. Causing the streamer plugin to error.

neCk
14/11/2011, 08:45 AM
btw doesen't matter anymore i solved the problem xD thanks for all support ! rep+1

Stigg
14/11/2011, 08:52 AM
Delete what you have and put this:
public OnPlayerEnterDynamicCP(playerid, checkpointid)//change the function to this
{
if(LoadCP[playerid] == 1)
{
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Entered!",3000,3);
SetPlayerCheckpoint(playerid,TInfo[playerid][Lastx],TInfo[playerid][Lasty],TInfo[playerid][Lastz],4.0);
LoadCP[playerid] = 2;
}
else if(LoadCP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"~g~Passangers Exited!",3000,3);
LoadCP[playerid] = 0;
SendFMessage(playerid, red,"[TAXI] "lgreen2"You have earned "lblue"%i "lgreen2"for transporting passangers.",TInfo[playerid][Pay]);
GivePlayerMoney(playerid,TInfo[playerid][Pay]);
PInfo[playerid][Missionspassed]++;
SetPlayerScore(playerid,PInfo[playerid][Missionspassed]);
IsPlayerInMission[playerid] = 0;
TogglePlayerAllDynamicCPs(playerid, 1);
PlaySound(playerid,1057);
}
return 1;
}
It should work now.