SA-MP Forums Archive
need help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need help (/showthread.php?tid=77868)



need help - luckie12 - 15.05.2009

help i get errors

what is wrong whit this?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/stars", cmdtext, true, 10) == 0)
    {
        SetPlayerWantedLevel(playerid,20);
        SendClientMessageToAll(RED, "Cops Jail %s He Or She Has 12 Stars");
        return 1;
    }
    return 0;
}
#endif
this are the errors:

pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
it says line 33
this is line 33:

pawn Код:
SendClientMessageToAll(RED, "Cops Jail %s He Or She Has 12 Stars")
whats wrong? please help ty alot


Re: need help cops - luckie12 - 15.05.2009

Quote:
Originally Posted by luckie12
hi i need help

how to make RCON admins a player to a cop? with commands?
plzzz help me


Re: need help cops - luckie12 - 15.05.2009

[quote=luckie12 ]
Quote:
Originally Posted by luckie12
plzzz help me
plz


Re: need help - harly - 15.05.2009

Quote:

SendClientMessageToAll(RED, "Cops Jail %s He Or She Has 12 Stars")

Learn to script.

Код:
A)
you need a string.
B) you forgot the ;
C) Gah..
remember the ;


Re: need help - luckie12 - 15.05.2009

Quote:
Originally Posted by harly
Quote:

SendClientMessageToAll(RED, "Cops Jail %s He Or She Has 12 Stars")

Learn to script.

Код:
A)
you need a string.
B) you forgot the ;
C) Gah..
remember the ;
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\stars4.pwn(33) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: need help - Joe Staff - 15.05.2009

Also %s won't do anything unless it's in format(...);
example:
pawn Код:
new tmpstring[MAX_PLAYER_NAME+50];
format(tmpstring,sizeof(tmpstring),"All on duty officers, arrest and incarcerate %s; he or she has an arrest warrant",whateverplayervariable);
SendClientMessageToAll(RED,tmpstring);



Re: need help - RyDeR` - 15.05.2009

A string whitout format = Error