i think the select is the problem.. kinda edited to my version o.0
test1 doesn't print. weird? the table is in database.
pawn Код:
stock LoadTempBans()
{
printf("[System] Loading Bans's....");
new line[1024],Bvar[2],Bstr[3][80];
mysql_query("SELECT * FROM Bans");
mysql_store_result();
printf("Test1");
if(mysql_num_rows() > 0)
{
printf("Test2");
while(mysql_fetch_row(line))
{
printf("Test3");
sscanf(line,"p<|>ds[24]s[16]ds[75]",Bvar[0],Bstr[0],Bstr[1],Bvar[1],Bstr[2]);
if(strlen(Bstr[0]) > 0) Bancount++;
Bvar[0] = TempBans[Bancount][Banid];
Bvar[1] = TempBans[Bancount][UnbanDate];
format(TempBans[Bancount][BannedName], 24, "%s",Bstr[0]);
format(TempBans[Bancount][BannedIP],17,"%s",Bstr[1]);
format(TempBans[Bancount][Reason],75,"%s",Bstr[2]);
printf("Banid:%d, Unbandate:%d, Name:%s, IP:%s, Reason:%s",TempBans[Bancount][Banid],
TempBans[Bancount][UnbanDate],TempBans[Bancount][BannedName],TempBans[Bancount][BannedIP],
TempBans[Bancount][Reason]);
}
}
printf("Finished");
return 1;
}
crashinfo
pawn Код:
SA-MP Server: 0.3c RC2
Exception At Address: 0x00BA424A
Registers:
EAX: 0x00000000 EBX: 0x0159463C ECX: 0x0012EA00 EDX: 0x00000000
ESI: 0x0115DC18 EDI: 0x0115DC18 EBP: 0x0012E9EC ESP: 0x0012E9B8
EFLAGS: 0x00010202
Stack:
+0000: 0x0115DC18 0x00000000 0x0012E9FC 0x0115DC18
+0010: 0x0159463C 0x0012EA3F 0x7FFFFFBF 0x0012EA00
+0020: 0x00000042 0x0012ED4C 0x0014E914 0x0012EA18
+0030: 0x77E7F82C 0x0012EA90 0x00BA783F 0x00000000
+0040: 0x0012EA00 0x00000004 0x636E7546 0x6E6F6974
+0050: 0x796D203A 0x5F6C7173 0x72657571 0x61632079
+0060: 0x64656C6C 0x65687720 0x6F6E206E 0x6F632074
+0070: 0x63656E6E 0x20646574 0x61206F74 0x6420796E
+0080: 0x62617461 0x00657361 0xFFFFFFFF 0x0115DC18
+0090: 0x0021F56C 0x01676988 0x0159463C 0x00000FE4
+00A0: 0x00483E94 0x004F3A93 0x00000FFF 0x018E924C
+00B0: 0x0115DC18 0x019473C0 0x0012EA88 0x00486421
+00C0: 0x004B53AC 0x004F3A78 0x0115DC18 0x95605742
+00D0: 0x00000000 0x0012EA90 0x01676A34 0x00401096
+00E0: 0x0115DC18 0x01945FE0 0x016C9CE0 0x00402BB3
+00F0: 0x0115DC18 0x00000040 0x0012EAC8 0x01945FE0
+0100: 0x0012EF5C 0x00000000 0x00000000 0x0115DC18
+0110: 0x0021F5DC 0x0027C314 0x0027C300 0x0027D760
+0120: 0x002518A4 0x0027D6E8 0x002518A4 0x0159463C
+0130: 0x016C9CE0 0x00000000 0x01590020 0x001356A4
its stopping here mysql_query("SELECT * FROM Bans");