Load Faction Vehicles problem (mysql) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Load Faction Vehicles problem (mysql) (
/showthread.php?tid=156978)
Load Faction Vehicles problem (mysql) -
oliverrud - 24.06.2010
Hey, I got a bunch of warnings at these lines. I think they are the stuff which causes the load system from not loading:
pawn Код:
format(sql, sizeof(sql), "SELECT COUNT(*) FROM factionvehicles");
mysql_query(sql);
mysql_store_result();
mysql_fetch_row(row);
totalfveh = strval(row);
new idx = 1;
while(idx < totalfveh)
{
format(sql, sizeof(sql), "SELECT * FROM factionvehicles WHERE VehID = %d", idx);
mysql_query(sql);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_row(row);
split(row, vehfstats, '|');
FCarInfo[idx][VehID] = strval(vehfstats[0]);
FCarInfo[idx][FactionID] = strval(vehfstats[1]);
FCarInfo[idx][Model] = strval(vehfstats[2]);
FCarInfo[idx][SpawnX] = floatstr(vehfstats[3]);
FCarInfo[idx][SpawnY] = floatstr(vehfstats[4]);
FCarInfo[idx][SpawnZ] = floatstr(vehfstats[5]);
FCarInfo[idx][SpawnAngle] = floatstr(vehfstats[6]);
FCarInfo[idx][Color1] = strval(vehfstats[7]);
FCarInfo[idx][Color2] = strval(vehfstats[8]);
AddStaticVehicle(FCarInfo[idx][Model],FCarInfo[idx][SpawnX],FCarInfo[idx][SpawnY],FCarInfo[idx][SpawnZ],FCarInfo[idx][SpawnAngle],FCarInfo[idx][Color1],FCarInfo[idx][Color2]);
idx ++;
}
Warnings I'm receiving:
Код:
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1741) : warning 213: tag mismatch
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1742) : warning 213: tag mismatch
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1743) : warning 213: tag mismatch
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1744) : warning 213: tag mismatch
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1745) : warning 213: tag mismatch
C:\Users\Oliver\Desktop\Made From Scratch Script\gamemodes\newtest.pwn(1748) : warning 213: tag mismatch
It's at the floatstr() ones example: FCarInfo[idx][SpawnX] = floatstr(vehfstats[3]);
Re: Load Faction Vehicles problem (mysql) -
Kar - 24.06.2010
please post warning lines!
Re: Load Faction Vehicles problem (mysql) -
oliverrud - 24.06.2010
I'm not getting errors however those warnings are making my loading system not working, I've tried to change them to: vehfstats[number] and strval(vehfstats[number]), no luck are there any other possibilities?