Code - Stopping rest of OnGameModeInit() from loading - 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: Code - Stopping rest of OnGameModeInit() from loading (
/showthread.php?tid=220060)
Code - Stopping rest of OnGameModeInit() from loading -
Antonio [G-RP] - 02.02.2011
I've got no idea whats wrong. The SQL tables aren't null, and this code used to work. Any ideas?
pawn Код:
printf("Loading Ranks...");
mysql_query("SELECT * FROM `ranks`");
mysql_store_result();
while(mysql_fetch_row(resultline)==1)
{
printf("%s", resultline);
new id, rid, rname[24];
if(!sscanf(resultline, "p<|>dds[23]", id, rid, rname))
{
RankInfo[id][rid][rFactionID] = id;
RankInfo[id][rid][rRankID] = rid;
strmid(RankInfo[id][rid][rName], rname, 0, strlen(rname), 255);
}
else
{
print("Error: There was a problem parsing rank data! Moving to next result.");
}
}
mysql_free_result();
Re: Code - Stopping rest of OnGameModeInit() from loading - [L3th4l] - 02.02.2011
I think you are breaking the array limits.
You set:
Then you use a destination size on the strmid line to: 255
Try setting, 255 to :
Re: Code - Stopping rest of OnGameModeInit() from loading -
Antonio [G-RP] - 02.02.2011
Thanks for the input, but I know that's not the problem, as I've done that in other places, too.