help i have problem
#1

i have problem this:

pawn Код:
C:\Documents and Settings\p\Desktop\New Folder\pawno\Untitled.pwn(75) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\p\Desktop\New Folder\pawno\Untitled.pwn(75) : error 017: undefined symbol "You"
C:\Documents and Settings\p\Desktop\New Folder\pawno\Untitled.pwn(75) : error 017: undefined symbol "Killed"
C:\Documents and Settings\p\Desktop\New Folder\pawno\Untitled.pwn(75) : 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.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        GivePlayerMoney(playerid, -1000);
        SendClientMessage(playerid, 0xFFFFFFFF, "You Died And Lost $1000");
        GivePlayerMoney(killerid, 1000);
        SendClientMessage(killerid,0xFFFFFFFF, "You Killed Him Get the Reward $1000);
    return 1;
}
how to fix that?
Reply
#2

You forgot the last " on this line;

pawn Код:
SendClientMessage(killerid,0xFFFFFFFF, "You Killed Him Get the Reward $1000<HERE>);
So this will work.

pawn Код:
SendClientMessage(killerid,0xFFFFFFFF, "You Killed Him Get the Reward $1000"); //
Reply
#3

You need to close the " "
so replace
pawn Код:
SendClientMessage(killerid,0xFFFFFFFF, "You Killed Him Get the Reward $1000);
with
pawn Код:
SendClientMessage(killerid,0xFFFFFFFF, "You Killed Him Get the Reward $1000");
Reply
#4

i got error again

pawn Код:
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : warning 215: expression has no effect
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : warning 215: expression has no effect
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : 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.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/kill',true)) {
    {
        SetPlayerHealth(playerid, 0);
        SendClientMessage(playerid,0xFFFFFFFF, "
You Killed Your Self");
        return 1;
    }
    return 0;
}
Reply
#5

You can't open an if-statement with two opening brackets.

pawn Код:
if(!strcmp(cmdtext,"/kill',true)) {
{
This tries to open the if-statement twice, due to the two {'s.

pawn Код:
if(!strcmp(cmdtext,"/kill',true))
{
That'll do it.
Reply
#6

error again

pawn Код:
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : warning 215: expression has no effect
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : warning 215: expression has no effect
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\p\Desktop\New Folder\pawno\nubitol.pwn(96) : 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.
Reply
#7

Now try to fix them yourself. You can't keep posting your errors all the time.
When you try to fix the errors yourself you will learn. We will stop helping you if you are going to post your errors every time you get one.

Believe me or not, the more you try the more you learn, even if you don't have a clue what it is from the beginning.
Reply
#8

Give me lines. It so simple to fix errors, specially these ones.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 0);
        SendClientMessage(playerid,0xFFFFFFFF, "You Killed Your Self");
        return 1;
    }
    return 0;
}
Couldn't be simpler
Reply
#9

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
You can't open an if-statement with two opening brackets.

pawn Код:
if(!strcmp(cmdtext,"/kill',true))
{
That'll do it.
No it won't Look at the strcmp.

The string is ended with an '

pawn Код:
if(!strcmp(cmdtext,"/kill",true))
{
That'll do it.
Reply
#10

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/kill----->'<------,true)) {
    {
        SetPlayerHealth(playerid, 0);
        SendClientMessage(playerid,0xFFFFFFFF, "You Killed Your Self");
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)