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)
+--- Thread: Need help (/showthread.php?tid=352578)



Need help - Stereotype - 20.06.2012

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


Re: Need help - iggy1 - 20.06.2012

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.


Re: Need help - Stereotype - 20.06.2012

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




Re: Need help - Skaizo - 20.06.2012

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;
}



Re: Need help - Stereotype - 20.06.2012

Quote:

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

error


Re: Need help - [MM]RoXoR[FS] - 20.06.2012

change cmd to cmdtext


Re: Need help - Stereotype - 20.06.2012

its cmdtext already


Re: Need help - Skaizo - 20.06.2012

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


Re: Need help - Stereotype - 20.06.2012

it crush pawno now when i try to compile :S