Need help with my filterscript - 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: Need help with my filterscript (
/showthread.php?tid=88101)
Need help with my filterscript -
kazai - 24.07.2009
i have just been programming a filterscript of mine but now something is broken.
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
new drivers[20];
forward starttimer();
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
new countfor;
new id;
print("\n--------------------------------------");
print(" Demolition Derby for --- by kazai");
print("--------------------------------------\n");
id = 0;
for(countfor = 0; countfor < 21; countfor++) {
drivers[id] = -1;
id++;
}
SetTimer("starttimer",180000,false);
print("DONE");
return 1;
}
thats the script basically, yet for some reason it never gets past the for loop anymore. it is necessary that it passes it to activate the timer. can anyone explain what is wrong and how to fix it? the reason i ask is cos it posts no error messages on compile
Re: Need help with my filterscript -
Weirdosport - 24.07.2009
You went a bit wrong with your loop. You defined loads of variables to increase with the loop, but that's unnecessary. Try this:
pawn Код:
#include <a_samp>
new drivers[20];
forward starttimer();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Demolition Derby for --- by kazai");
print("--------------------------------------\n");
for(new id; id < 21; id++)
{
drivers[id] = -1;
}
SetTimer("starttimer",180000,false);
print("DONE");
return 1;
}
public starttimer()
{
//blah blah
}