Strange error.
#1

So, 3 hours passed and i still couldn't figure out where is the actual problem.

These are the errors i am getting
Код:
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(1857) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(1859) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(3946) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(3980) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(11820) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(11821 -- 11823) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(11868) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(14421) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(14445) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(14450) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(14470) : error 001: expected token: "-string end-", but found "-identifier-"
The weird thing is, these errors are in those lines where pInfo[playerid][Password] are.

And i have checked my player enum but it looks fine for me
pawn Код:
enum PlayerData
{
    ID,
    PlayerName[24],
    Password[129],
    NewPassword[50],
    AdminLevel,
    VIP,
    Money,
    Score,//....
Reply
#2

Show your last variable of the PlayerData enum, maybe just above pInfo[playerid][Password]
Reply
#3

pawn Код:
UseMoney,
    LastIntrestTime,
    RentedVehicleID
}

new pInfo[MAX_PLAYERS][PlayerData];
Well, i didn't find any problem in the enum, they are all set properly and separated with comma.
Reply
#4

show us the error lines
Reply
#5

pawn Код:
//Error line 1:
mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (Nick, Password, Admin_Level, Money, Score, VIP, License, Wanted_Level, Police_Stats, Trucker_Loads, Convoys, Police_Fines, Police_Jailed, Pilot_Flights, Meters_Driven, IP) VALUES('%s', '%s', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0.0', '%s')",
Name,
pInfo[playerid][Password],
pInfo[playerid][AdminLevel],
pInfo[playerid][Money],
pInfo[playerid][Score],
pInfo[playerid][VIP],
pInfo[playerid][TruckerLicense],
pInfo[playerid][WantedLevel],
pInfo[playerid][PoliceStats],
pInfo[playerid][StatsTruckerJobs],
pInfo[playerid][StatsConvoyJobs],
pInfo[playerid][StatsPoliceFined],
pInfo[playerid][StatsPoliceJailed],
pInfo[playerid][StatsPilotJobs],
pInfo[playerid][StatsMetersDriven],
mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);


//Error line 2:
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);

//Error line 3:
printf("%s", pInfo[playerid][Password]);

//Error Line 4:
pInfo[playerid][Password] =  0;
Errors are only in those lines where there is pInfo[playerid][Password]
There are other lines too but all have pInfo[playerid][Password] variable.
Reply
#6

PHP код:
pInfo[playerid][StatsMetersDriven]); 
Reply
#7

Nope thats not the problem, i accidentally copied the half code lol. After pInfo[playerid][StatsMetersDriven], there is IP);
Reply
#8

Should this be:
pawn Код:
mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid));
:l
Reply
#9

Remove the , the coma from the last line of enum.
Reply
#10

After i added that, 2 more error appeared
pawn Код:
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(11838) : error 001: expected token: ";", but found ")"
C:\Users\bijay\Desktop\uTrucking\gamemodes\PPC_Trucking.pwn(11838) : error 029: invalid expression, assumed zero
And rest of the errors are still there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)