"then" but found "{" . Help
#1

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/market", true))
    {
        if IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797) // With this line here and the down one
        { // Those lines here
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        return 0;
    }
    return 1;
}
Код:
C:\Documents and Settings\Private\Desktop\New folder\filterscripts\Smoke.pwn(65) : error 001: expected token: "*then", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Try this

pawn Код:
IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797))
Reply
#3

You forgot the brackets I think that's it.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/market", true))
    {
        if(IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797)) // With this line here and the down one
        { // Those lines here
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        return 0;
    }
    return 1;
}
Reply
#4

pawn Код:
C:\Documents and Settings\Private\Desktop\New folder\filterscripts\Smoke.pwn(63) : error 001: expected token: "*then", but found ";"
C:\Documents and Settings\Private\Desktop\New folder\filterscripts\Smoke.pwn(63) : error 036: empty statement
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Probably if i am making an scripting help the solution would not be so easy .
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/market", true))
    {
        if(IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797)) // With this line here and the down one
        { // Those lines here
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "You are not at the place!");
        }
        return 1;
    }
    return 1;
}
Try this.
Reply
#6

Try that:

Код:
        if(!strcmp(cmdtext, "/market", true))
    {
        if (IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797))
        { 
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        return 0;
    }
Reply
#7

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/market", true))
    {
        if(IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797)) // With this line here and the down one
        { // Those lines here
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "You are not at the place!");
        }
        return 1;
    }
    return 1;
}
Try this.
Still same problem

pawn Код:
C:\Documents and Settings\Private\Desktop\New folder\filterscripts\Smoke.pwn(64) : error 001: expected token: "*then", but found "{"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
My code for reminder :

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/market", cmdtext, true, 10) == 0)
    {
        if IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797)
        {
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "You are not in any market !");
        }
        return 1;
    }
    return 1;
}
Quote:
Originally Posted by Blackazur
Посмотреть сообщение
Try that:

Код:
        if(!strcmp(cmdtext, "/market", true))
    {
        if (IsPlayerInRangeOfPoint(playerid , 2.0, 1067.9446, -892.5276, 43.1797))
        { 
             ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "What do you want to buy ?", "Sprunk ($3)\nBeer ($5)\nWine ($10)", "Purchase", "Cancel");
        }
        return 0;
    }
Thanks working . Rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)