Need help
#1

pawn Код:
if(strcmp(cmd, "/refresh", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid,0);
//          TextDrawHideForPlayer(playerid,lbt);
//          TextDrawHideForPlayer(playerid,lbb);
            SendClientMessage(playerid,COLOR_YELLOW,"You have been re-freshed, if you have any more problems contact an admin!");
            return 1;
        }
    }

if(strcmp(cmd, "/stuck", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new Float:slx, Float:sly, Float:slz;
            GetPlayerPos(playerid, slx, sly, slz);
            SetPlayerPos(playerid, slx, sly, slz+2);
            TogglePlayerControllable(playerid, 1);
            return 1;
        }
Quote:

C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31197) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31199) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31205) : error 021: symbol already defined: "SendClientMessage"
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31206) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31210) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31212) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31215) : error 021: symbol already defined: "GetPlayerPos"
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(3121 : error 010: invalid function or declaration

What is wrong
Reply
#2

Does it compile ok when you comment those lines? If it doesn't compile, the code you posted is not the problem.

If it does compile tell us where you have placed that code. Preferably post the callback/function it is in.
Reply
#3

i posted it at the end of the script .. i commented it and i got -1 error now just those errors
Quote:

C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31197) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31199) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31206) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31210) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31212) : error 010: invalid function or declaration
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(31215) : error 021: symbol already defined: "GetPlayerPos"
C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(3121 : error 010: invalid function or declaration

Reply
#4

that,you need put under OnPlayerCommandText
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/refresh", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid,0);
//          TextDrawHideForPlayer(playerid,lbt);
//          TextDrawHideForPlayer(playerid,lbb);
            SendClientMessage(playerid,COLOR_YELLOW,"You have been re-freshed, if you have any more problems contact an admin!");
            return 1;
        }
    }
    if(strcmp(cmdtext, "/stuck", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new Float:slx, Float:sly, Float:slz;
            GetPlayerPos(playerid, slx, sly, slz);
            SetPlayerPos(playerid, slx, sly, slz+2);
            TogglePlayerControllable(playerid, 1);
        }
    }
    return 1;
}
Reply
#5

Quote:

C:\Documents and Settings\PANTA\My Documents\SKRIPTAA\gamemodes\BeotelRP.pwn(3119 : error 021: symbol already defined: "OnPlayerCommandText"

error
Reply
#6

change cmd to cmdtext
Reply
#7

its cmdtext already
Reply
#8

Quote:
Originally Posted by Stereotype
Посмотреть сообщение
error
you using OnPlayerCommandText,you need put command into OnPlayerCommandText(one callback)
Reply
#9

it crush pawno now when i try to compile :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)