Jump to content
  • 0

Errori if (newkeys = KEY_FIRE)


Ch1NeZu

Question

Salut cand incerc sa compilez modu imi da errorile astea ce am gresit ?

uitati codu

if (newkeys==KEY_FIRE)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901) || PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901))
{
    MoveObject(sfpdgatea, -1624.119384, 688.126037, 6.303413, 4.0);
    MoveObject(sfpdgateb, -1648.143554, 688.126037, 6.303413, 4.0);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "The gate's of SFPD has been opened and close in 5 second(s).");
    SetTimer("sfpdgateaclose",3500, false);
    SetTimer("sfpdgatebclose",3500, false);
    return 1;
}
}
}
}
return 1;
}
Uitati errorile
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35181) : error 010: invalid function or declaration
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35183) : error 010: invalid function or declaration
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35185) : error 010: invalid function or declaration
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35187) : error 010: invalid function or declaration
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35194) : error 010: invalid function or declaration
C:\Documents and Settings\ChiNeZu\Desktop\MrIllusion\gamemodes\eRP.pwn(35199) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Incearca asa daca nu ai pus codurile la public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if (newkeys==KEY_FIRE)
   {
       if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 ||       PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
       {
           if(IsPlayerConnected(playerid))
           {
               if(PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901) || PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901))
               {
                   MoveObject(sfpdgatea, -1624.119384, 688.126037, 6.303413, 4.0);
                   MoveObject(sfpdgateb, -1648.143554, 688.126037, 6.303413, 4.0);
                   SendClientMessage(playerid, COLOR_LIGHTGREEN, "The gate's of SFPD has been opened and close in 5 second(s).");
                   SetTimer("sfpdgateaclose",3500, false);
                   SetTimer("sfpdgatebclose",3500, false);
                   return 1;
               }
           }
       }
   }
   return 1;
}

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Am bagat in filterscriptul meu codul si acm imi da alte erori

C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(212) : error 001: expected token: ")", but found "["
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(212) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(212) : error 017: undefined symbol "pMember"
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(212) : 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.
Toate de la linia asta
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 ||       PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
        

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

da am bagat - am bagat bine ? sau trebuia new pMember[MAX_PLAYERS] ?

 new pMember;
new pJob;
new pLeader;
dar ce fac cu errorile astea ...
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(214) : error 001: expected token: ")", but found "["
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(214) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(214) : warning 215: expression has no effect
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(214) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(214) : 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.

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

Am facut ce mi-ai zis vyo dar acum imi a erori la linia asta

if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
Si uite si erorile
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(202) : error 001: expected token: ")", but found "["
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(202) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(202) : warning 215: expression has no effect
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(202) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\ChiNeZu\Desktop\basic.pwn(202) : 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.

Daca vrei dami id tau sau ial pe al meu cstrike_creature si iti dau direct fs-ul ... sa nu mai stam sa facem off-topic...

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

#include <a_samp>

#define COLOR_LIGHTGREEN 0x9ACD32AA
//---------------------//
enum pInfo
{
    pMember,
    pJob,
    pLeader
};
new sfpdgatea;
new sfpdgateb;
new PlayerInfo[MAX_PLAYERS][pInfo];
//---------------------//
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
//---------------------//
public OnFilterScriptInit()
{
sfpdgatea = CreateObject(968,1544.663,-1630.896,13.430,0.0,-90.241,-90.000);//Schimba cu obiectele tale
sfpdgateb = CreateObject(968,1544.663,-1630.896,13.430,0.0,-90.241,-90.000);//Schimba cu obiectele tale
      
return 1;
}
//---------------------//
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys==KEY_FIRE)
    {
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 ||       PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
        {
            if(IsPlayerConnected(playerid))
            {
                if(PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901) || PlayerToPoint(10, playerid,-1631.0670,682.4352,7.1901))
                {
                    MoveObject(sfpdgatea, -1624.119384, 688.126037, 6.303413, 4.0);
                    MoveObject(sfpdgateb, -1648.143554, 688.126037, 6.303413, 4.0);
                    SendClientMessage(playerid, COLOR_LIGHTGREEN, "The gate's of SFPD has been opened and close in 5 second(s).");
                    SetTimer("sfpdgateaclose",3500, false);
                    SetTimer("sfpdgatebclose",3500, false);
                    return 1;
                }
            }
        }
    }
    return 1;
}
//---------------------//
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}

Incerca asa

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

ai schimbat

sfpdgatea = CreateObject(968,1544.663,-1630.896,13.430,0.0,-90.241,-90.000);//Schimba cu obiectele tale
sfpdgateb = CreateObject(968,1544.663,-1630.896,13.430,0.0,-90.241,-90.000);//Schimba cu obiectele tale

?

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.