SA-MP Forums Archive
Problem with - ASK command - REP+ - 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)
+--- Thread: Problem with - ASK command - REP+ (/showthread.php?tid=566451)



Problem with - ASK command - REP+ - NoDi522 - 06.03.2015

Hello. I've a little problem with AskQ command. If someone can help I will rep+!

- ASKQ Command:
PHP код:
CMD:askq(playerid,params[])
{
    new 
pitanje,novac,ime[MAX_PLAYER_NAME],ime2[MAX_PLAYER_NAME],poruka[128],poruka2[128];
    if(
sscanf(params,"s[128]",pitanje)) return SendClientMessage(playerid,-1,"{FFFFFF}Koristenje:{FFF1AF} /Askq (pitanje)");
    else if(
playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Igrač nije ulogiran na serveru.");
    else if(
playerid == PlayerInfo[playerid][pAdministrator]) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Admini nemogu postavljati pitanja");
    else if(
GetPlayerMoney(playerid) > novac) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu za postaviti pitanje{C9FFAB} ($100)");
    else
    {
        
GetPlayerName(playerid,ime,sizeof(ime));
        
format(poruka,sizeof(poruka),"{FFA1A1}[ASKQ]{FFF1AF} %s {FFFFFF}je postavio pitanje za Admine. Pitanje:{FFF1AF} %s",ime,pitanje);
        {
            for(new 
0; < MAX_PLAYERSi++)
                if(
PlayerInfo[i][pAdministrator] > 0)
              
SendClientMessage(i,-1,poruka);
        }
          
format(poruka2,sizeof(poruka2),"{FFA1A1}[ASKQ]{FFFFFF} Uspjesno ste postavili pitanje.{C9FFAB} (-100)");
          
SendClientMessage(playerid,-1,poruka2);
    }
    return 
1;

Errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(392) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(392) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(392) : error 001expected token")"but found ";"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(392) : error 036: empty statement
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(392) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line 392:

PHP код:
for(new 0; < MAX_PLAYERSi++) 
Thank you!


Respuesta: Problem with - ASK command - REP+ - JuanStone - 06.03.2015

change for:

PHP код:
for(new 0MAX_PLAYERSi++) 



Re: Problem with - ASK command - REP+ - NoDi522 - 06.03.2015

Thank you so much! REP +