SA-MP Forums Archive
Why is this keep happening - 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: Why is this keep happening (/showthread.php?tid=640446)



Why is this keep happening - 1fret - 02.09.2017

So i made my /admins command but i keep getting errors on this line , now this is what i want this line to do, i want it to check if the admins are afk and if they r it should show "AFK" Beside his/her name..

PHP код:
           if(pInfo[i][OnDuty] == 1strcat(iTag"{1A661A}ON-DUTY ");
            if(
Afk(i) == 1strcat(iTag"AFK "); // line with the error
             
format(astringsizeof(astring), "  %s %s (ID: %d) %s"AdminLevelName(i), GetName(i), iiTag);
            
SendClientMessage(playerid0xe1e3e6FF,astirng); 
PHP код:
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4976) : error 012invalid function callnot a valid address
C
:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4976) : warning 215expression has no effect
C
:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4976) : error 001expected token";"but found ")"
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4976) : error 029invalid expressionassumed zero
C
:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA.pwn(4976) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors




Re: Why is this keep happening - Meller - 02.09.2017

Pretty sure "Afk" is a variable hm?


if(Afk[i] == 1) strcat(iTag, "AFK ");

edit: love u 2 goldenlion <33


Re: Why is this keep happening - GoldenLion - 02.09.2017

Код:
if(Afk(i) == 1)
You need square brackets there instead.

EDIT: Seems like Meller and I posted at the same time.


Re: Why is this keep happening - 1fret - 02.09.2017

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Код:
if(Afk(i) == 1)
You need square brackets there instead.

EDIT: Seems like Meller and I posted at the same time.
Quote:
Originally Posted by Meller
Посмотреть сообщение
Pretty sure "Afk" is a variable hm?


if(Afk[i] == 1) strcat(iTag, "AFK ");

edit: love u 2 goldenlion <33
Thanks i figured it out once Meller replied but anyways thanks for the response mates rep+ you both