SA-MP Forums Archive
Strange error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Strange error. (/showthread.php?tid=520761)



Strange error. - iOxide - 20.06.2014

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,//....



Re: Strange error. - Laurey - 20.06.2014

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


Re: Strange error. - iOxide - 20.06.2014

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.


Re: Strange error. - AiRaLoKa - 20.06.2014

show us the error lines


Re: Strange error. - iOxide - 20.06.2014

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.


Re: Strange error. - Golf - 20.06.2014

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



Re: Strange error. - iOxide - 20.06.2014

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


Re: Strange error. - Threshold - 20.06.2014

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


Re: Strange error. - Tuntun - 20.06.2014

Remove the , the coma from the last line of enum.


Re: Strange error. - iOxide - 20.06.2014

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.