Jump to content

Question

Posted (edited)

Code:    Timer = SetTimer(CheckTimer, 1000, true);

        RestartTime ==;
        if(RestartTime == 5) 

 

La Timer = SetTimer(CheckTimer, 1000, true);  am error 076: syntax error in the expression, or invalid function call

si la  RestartTime ==; if(RestartTime == 5)  am :error 029: invalid expression, assumed zero ; warning 215: expression has no effect ; error 001: expected token: ";", but found "if"

Edited by AlexuTzuBss

6 answers to this question

Recommended Posts

  • 0
Posted (edited)
Acum 2 ore, AlexuTzuBss a spus:

Code:    Timer = SetTimer(CheckTimer, 1000, true);

        RestartTime ==;
        if(RestartTime == 5) 

 

La Timer = SetTimer(CheckTimer, 1000, true);  am error 076: syntax error in the expression, or invalid function call

si la  RestartTime ==; if(RestartTime == 5)  am :error 029: invalid expression, assumed zero ; warning 215: expression has no effect ; error 001: expected token: ";", but found "if"

Timer = SetTimer("CheckTimer", 1000, true);  

si la RestartTime ==; if(RestartTime == 5)  probabil in loc de ==; trebuie ++; nu imi pot da seama doar dintr o linie dar e clar ca nu poti verifica daca acea variabila este egala cu ;

Edited by valivaly96
  • 0
Posted
1 hour ago, valivaly96 said:

Timer = SetTimer("CheckTimer", 1000, true);  

si la RestartTime ==; if(RestartTime == 5)  probabil in loc de ==; trebuie ++; nu imi pot da seama doar dintr o linie dar e clar ca nu poti verifica daca acea variabila este egala cu ;

Asta e tot ce am facut pana acum https://pastebin.com/4TmnhpeG pana acum imi da erori doar la sistemul de restart

  • 0
Posted
1 oră în urmă, AlexuTzuBss a spus:

Asta e tot ce am facut pana acum https://pastebin.com/4TmnhpeG pana acum imi da erori doar la sistemul de restart

La checktimer in loc de RestartTime ++; pui RestartTime --; ca altfel nu va ajunge never ever la 0. Compileaza si vezi daca mai ai erori. Daca mai ai revino cu erorea

  • 0
Posted (edited)
9 hours ago, valivaly96 said:

La checktimer in loc de RestartTime ++; pui RestartTime --; ca altfel nu va ajunge never ever la 0. Compileaza si vezi daca mai ai erori. Daca mai ai revino cu erorea

am rezolvat, nu stii cum as putea sa dau kick la player in ultimle 5 secunde?

 

Edited by AlexuTzuBss
  • 0
Posted
Acum 3 ore, AlexuTzuBss a spus:

am rezolvat, nu stii cum as putea sa dau kick la player in ultimle 5 secunde?

 

function Kick_Ban ( playerid, bool: kickban ) return ( !kickban ) ? Kick ( playerid ) : Ban ( playerid );//daca kickban==0 retuneaza kick altfel ban;
#define KickEx(%1) 			SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, false )
#define Ban(%1) 			SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, true )			// sus de tot la celelate #define
 //ai si functia de ban cadou :))
  
public CheckTimer()
{
    if(RestartTime > 0)
    {
        RestartTime ++;
        if(RestartTime == 0) GameModeExit();
      	if(RestartTime == 5){
         foreach(Player,i){
           SCM(i,-1,"Ai primit kick deoarece serverul se va restarta");
           KickEx(i);
         }
        }
    }
    return 1;
}

 

  • 0
Posted
4 hours ago, valivaly96 said:

function Kick_Ban ( playerid, bool: kickban ) return ( !kickban ) ? Kick ( playerid ) : Ban ( playerid );//daca kickban==0 retuneaza kick altfel ban;
#define KickEx(%1) 			SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, false )
#define Ban(%1) 			SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, true )			// sus de tot la celelate #define
 //ai si functia de ban cadou :))
  
public CheckTimer()
{
    if(RestartTime > 0)
    {
        RestartTime ++;
        if(RestartTime == 0) GameModeExit();
      	if(RestartTime == 5){
         foreach(Player,i){
           SCM(i,-1,"Ai primit kick deoarece serverul se va restarta");
           KickEx(i);
         }
        }
    }
    return 1;
}

 

Rezolvira, multumesc !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.