Making Time in LosSantos Bug.
#1

Well i use pconnecttime to make it score in tab. But when the player relog it reset to 0. I delete the lvel and respectpoint, but still happen what should i do?

: error 001: expected token: ";", but found "("

Quote:

public OnPlayerConnect(playerid)
{
LoggedTime[playerid] = 0;
new string[256];
gPlayerLogged[playerid] = 0;
gAdminLogged[playerid] = 0;
new plname[MAX_PLAYER_NAME],tmpvar;
GetPlayerName(playerid, plname, sizeof(plname));
if(!NameIsRP(plname))
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: Your name is not acceptable.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Hint: your name must be in the format Firstname_Lastname.");
Kick(playerid); //yes, use Kick here because theres no data to save
return 1;
}
if(IsIPBanned(playerid)) {
if((BanInfo[tmpvar][BanInfoTS]-GetUnixTime())!=0) {
SendClientMessage(playerid,COLOR_YELLOW2,"You are currently banned. Please wait for this to expire");
SendClientMessage(playerid,COLOR_LIGHTRED,"If you feel this is a mistake post a appeal on the forums");
tmpvar=PlayerInfo[playerid][pRank]; //just a reused variable
new numdays=(BanInfo[tmpvar][BanInfoTS]-GetUnixTime())/86400;
format(string,sizeof(string),"Your ban expires in %i day(s). Ban Reason: %s",numdays,BanInfo[tmpvar][BanInfoReason]);//just reused variables
SendClientMessage(playerid,COLOR_LIGHTRED,string);
Kick(playerid); //don't ban because if it expires they will be banned..
}
}
PlayerInfo[playerid][pCalledTutSay]=0;//this must be outside initplayer
InitPlayer(playerid);
SetPlayerColor(playerid,COLOR_GRAD2);
foreach (Player, i)
{
if(BlockPMPerson[playerid][i] == 1)
{
BlockPMPerson[playerid][i] = 0;
}
}

new icons = 0;

for(new h = 0; h < sizeof(IntInfo); h++)
{
if(IntInfo[h][iIcon] != 0)
{
SetPlayerMapIcon(playerid, icons, IntInfo[h][iEntrancex], IntInfo[h][iEntrancey], IntInfo[h][iEntrancez], IntInfo[h][iIconT], COLOR_YELLOW);
icons++;
}
}

SetPlayerMapIcon(playerid, icons, 1641.5096,-2241.4404,13.4949, 38, COLOR_YELLOW); // Spawn Point
icons++;
SetPlayerMapIcon(playerid, icons, 978.6165,-1255.9263,16.9510, 27, COLOR_YELLOW); // Modshop
icons++;
SetPlayerMapIcon(playerid, icons, 1041.3632,-1028.2789,32.1016, 27, COLOR_YELLOW); // Modshop
icons++;
SetPlayerMapIcon(playerid, icons, 2645.3433,-2038.6853,13.5500, 27, COLOR_YELLOW); // Modshop
icons++;
// SetPlayerMapIcon(playerid, icons, 1573.5973,-2351.7605,13.5547, 55, COLOR_YELLOW); // Portcar
// icons++;

new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "users/%s.ini", sendername);
new File: hFile = fopen(string, io_read);

if (hFile)
{
gPlayerAccount[playerid] = 1;
SetPlayerScore(playerid)(pConnectTime); ((THis is the Line ERROR))
fclose(hFile);
}
else
{
gPlayerAccount[playerid] = 0;
}

return 1;
}

Reply
#2

What line is the error on? It means that the line before needs to end with a ;, or the current line needs to end with an ;
Reply
#3

what line do you get the error on?
Reply
#4

Quote:

gPlayerAccount[playerid] = 1;
SetPlayerScore(playerid)(pConnectTime); ((THis is the Line ERROR))
fclose(hFile);

I dont know whats the problem.
Reply
#5

Hmmm Not sure what to help you with here!
Reply
#6

I dont seem to see any errors with it. nothing is wrong but why still i get this error. been trying to fix it almost 5 hours.
Reply
#7

Nevermind i fix the script by myself -.-
Reply
#8

Good Job! Heads up to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)