[HELP]Timer
#1

CODE

PHP код:
//OnGameModeInit
 
SetTimer("scoretimer"1000true); 
PHP код:
//OnPlayerConnect
forward scoretimer(playerid);
public 
scoretimer()
{
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
        new 
prank[128];
        
format(pranksizeof(prank), "Rank : %s" ,GetRankName(i));
        
PlayerTextDrawShow(playerid ,Textdraw2[i], prank);
        }
    }

Error
Код:
F:\SAMP\gamemodes\MOD.pwn(1686) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\MOD.pwn(1686) : error 017: undefined symbol "scoretimer"
F:\SAMP\gamemodes\MOD.pwn(1687) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\MOD.pwn(1687) : error 017: undefined symbol "scoretimer"
F:\SAMP\gamemodes\MOD.pwn(1695) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Код:

4 Errors.
Reply
#2

Hi bro

PHP код:
Error 
warning 202number of arguments does not match definition
Error line 

PlayerTextDrawShow(playerid,Textdraw2[i], prank); 
Reply
#3

you can't use the prank inside it, it should be like this

pawn Код:
PlayerTextDrawShow(playerid,Textdraw2[i]);
if you want it to use a format, you need to use this

https://sampwiki.blast.hk/wiki/TextDrawSetString
Reply
#4

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)