Couple stupid errors...
#1

Header
pawn Код:
new timer746453;
new timeeeeer553;
First check wich timer is running timer746453 or timeeeeer553 and saves one wich is running to timer535236236.
But problem is this, I get these errors
warning 204: symbol is assigned a value that is never used: "timer535236236" -> line new timer535236236 = timer746453;
warning 204: symbol is assigned a value that is never used: "timer535236236" -> line new timer535236236 = timeeeeer553;
error 017: undefined symbol "timer535236236" -> line dini_IntSet("test.ini", "drivinned", timer535236236);
error 017: undefined symbol "timer535236236" -> line dini_IntSet("test2.ini", "drivinned", timer535236236);


ON PLAYER SPAWN HEAD
pawn Код:
--------------------------------------------
I am sure about next couple lines causes error:

    if (timer746453 > 1) {
    new timer535236236 = timer746453;
    }
    else if (timeeeeer553 > 1) {
    new timer535236236 = timeeeeer553;
    }
---------------------------------------------------
   
    if(strcmp(RPN(playerid), "Testifafsi35", true) == 0)
    {
    dini_IntSet("test.ini", "drivinned", timer535236236);
    }
   
    if(strcmp(RPN(playerid), "Testifafsi", true) == 0)
    {
    dini_IntSet("test2.ini", "drivinned", timer535236236);
    }
ON PLAYER SPAWN BOTTOM WICH STARTS TIMER timeeeeer553
pawn Код:
if(strcmp(RPN(playerid), "TEstplayername", true) == 0)
    {
    timeeeeer553 = SetTimerEx("TesFunc", timeeer4, 1, "i", playerid);
    }
    if(strcmp(RPN(playerid), "TEstplayername2", true) == 0)
    {
    timeeeeer553 = SetTimerEx("TesFunc", timeeer4, 1, "i", playerid);
    }
TEST FUNC WICH STARTS TIMER timer746453
pawn Код:
timer746453 = SetTimerEx("TEstFim", DEFAULT_CAR_LICENCE_EXP, 1, "i", playerid);
Reply
#2

What are you trying to do with the first 2 IF statements?

If you're trying to check the timer value then it's not possible. You need to create a new variable that is increased every time the timer runs, then use that variable in the IF statements.

pawn Код:
new timercount;
forward Timer();

SetTimer("Timer", 1000, true);

public Timer()
{
timercount++;
//Timer functions...
return 1;
}

//Then in another part of your script, to check the timer, you do:

if(timercount > 10) //Checks if the timer has been running for 10 seconds
Reply
#3

I have 3 hour timer in my script, so I think I am removing it then, coz its not possible to read timer value... what was meaned to be.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)