Simple Problem - Help!
#1

The problem is with the timers, I want someone to enter this certain checkpoint, and then a 10 second timer would start, after 10 seconds an explosion would occur there and the timer would be killed.
I use this,
Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(gTeam[playerid] == Team1)
    {
        SetTimer("message",10000,true);
        GameTextForPlayer(playerid,"Stay in the checkpoint for ~g~10 seconds!",3000,3);
    	new pName[24];
    	new str[128];
    	GetPlayerName(playerid, pName, 24);
    	format(str, 128, "%s is placing the bomb!", pName);
    	SendClientMessageToAll(COLOR_INTRO, str);
	}
    else if(gTeam[playerid] == Team2)
    {
		GameTextForPlayer(playerid,"~g~Defend this checkpoint",3000,3);
    }
    
	return 1;
}

public message()
{
	DisablePlayerCheckpoint();
	GameTextForAll("The bomb will explode in 10 seconds",5000,5);
}
And the timer keeps on repeating itself. I used KillTimer(message); under public message() but it would give this:
Код:
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(42) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(43) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(44) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(65) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(66) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(67) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(108) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(116) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(151) : warning 204: symbol is assigned a value that is never used: "string"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(177) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(192) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(234) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(236) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
In need of help ASAP.
Reply
#2

try this maybe tell me if works
pawn Код:
new ExT;
forward message(playerid,X,Y,Z);
forward OnPlayerPrivmsg(/*W/E suppose to be here*/);
forward OnPlayerInfoChange(/*W/E suppose to be here*/);
public OnPlayerEnterCheckpoint(playerid)
{
    if(gTeam[playerid] == Team1)
    {
        new Float:X,Float:Y,Float:Y;
        GetPlayerPos(playerid,X,Y,Z);
        GameTextForPlayer(playerid,"Stay in the checkpoint for ~g~10 seconds!",3000,3);
        new pName[24];
        new str[128];
        GetPlayerName(playerid, pName, 24);
        format(str, 128, "%s is placing the bomb!", pName);
        SendClientMessageToAll(COLOR_INTRO, str);
           ExT=SetTimerEx("message",10000,false,"ifff",playerid,X,Y,Z);
    }
    else if(gTeam[playerid] == Team2)
        GameTextForPlayer(playerid,"~g~Defend this checkpoint",3000,3);
   
    return 1;
}

public message(playerid,Float:X,Float:Y,Float:Z)
{
    DisablePlayerCheckpoint();
           CreateExplosion(X,Y,Z,2,10)
           return KillTimer(ExT);
}
Reply
#3

Well, I did all what you wrote (actually I copy pasted)
And this is what came up:
Код:
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(44) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(45) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(46) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(67) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(68) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(69) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(110) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(118) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(153) : warning 204: symbol is assigned a value that is never used: "string"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(176) : error 025: function heading differs from prototype
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(191) : error 025: function heading differs from prototype
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(215) : error 021: symbol already defined: "Y"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(216) : error 017: undefined symbol "Z"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(223) : error 017: undefined symbol "Z"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(215) : warning 203: symbol is never used: "Y"
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(231) : error 025: function heading differs from prototype
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(233) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(234) : warning 213: tag mismatch
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(234) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\Stuff\Server\gamemodes\Untitled.pwn(235) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
And thanks for assisting at the very least, Because some people just hate noobs and troll on them..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)