Error ..
#1

pawn Код:
C:\Documents and Settings\User\Desktop\щшъ фший\filterscripts\adminspec.pwn(14) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\щшъ фший\filterscripts\adminspec.pwn(14) : error 017: undefined symbol "cmd_spec"
C:\Documents and Settings\User\Desktop\щшъ фший\filterscripts\adminspec.pwn(14) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\щшъ фший\filterscripts\adminspec.pwn(14) : 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.
line 14:
pawn Код:
COMMAND:spec(playerid, params[])
what the problem
Reply
#2

which comand maker you are using or use
Код:
CMD:spec(playerid, params[])
Reply
#3

Show some lines before and after this code maybe missing brackets or something ?!
Reply
#4

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Show some lines before and after this code maybe missing brackets or something ?!
Lol ... Are you kidding me ? What line he shows us the line 14.. And Missing brackets ?
Reply
#5

Quote:
Originally Posted by мυ∂υℓ_вacнα
Посмотреть сообщение
which comand maker you are using or use
Код:
CMD:spec(playerid, params[])
No work
Still the same error
Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Show some lines before and after this code maybe missing brackets or something ?!
It provides you?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]){
COMMAND:Spy(playerid, params[])
{
    new id;// This will hold the ID of the player you are going to be spectating.
    if(!IsPlayerAdmin(playerid))return 0;// This checks if the player is logged into RCON, if not it will return 0; (Showing "SERVER: Unknown Command") You can replace it with your own admin check.
    if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "/spec [id]");// Now this is where we use sscanf to check if the params were filled, if not we'll ask you to fill them
    if(id == playerid)return SendClientMessage(playerid,Grey,".אתה לא יכול לצפות בעצמך");// Just making sure.
    if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, Grey, ".השחקן לא מחובר");// This is to ensure that you don't fill the param with an invalid player id.
    if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,".אתה כבר צופה במישהו");// This will make you not automatically spec someone else by mistake.
    GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// This is getting and saving the player's position in a variable so they'll respawn at the same place they typed '/spec'
    Inter[playerid] = GetPlayerInterior(playerid);// Getting and saving the interior.
    vWorld[playerid] = GetPlayerVirtualWorld(playerid);//Getting and saving the virtual world.
    TogglePlayerSpectating(playerid, true);// Now before we use any of the 3 functions listed above, we need to use this one. It turns the spectating mode on.
    if(IsPlayerInAnyVehicle(id))//Checking if the player is in a vehicle.
    {
        if(GetPlayerInterior(id) > 0)//If the player's interior is more than 0 (the default) then.....
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));//.....set the spectator's interior to that of the player being spectated.
        }
        if(GetPlayerVirtualWorld(id) > 0)//If the player's virtual world is more than 0 (the default) then.....
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));//.....set the spectator's virtual world to that of the player being spectated.
        }
        PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));// Now remember we checked if the player is in a vehicle, well if they're in a vehicle then we'll spec the vehicle.
    }
    else// If they're not in a vehicle, then we'll spec the player.
    {
        if(GetPlayerInterior(id) > 0)
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));
        }
        if(GetPlayerVirtualWorld(id) > 0)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
        }
        PlayerSpectatePlayer(playerid,id);// Letting the spectator spec the person and not a vehicle.
    }
    GetPlayerName(id, Name, sizeof(Name));//Getting the name of the player being spectated.
    format(String, sizeof(String),".%s אתה צופה בשחקן",Name);// Formatting a string to send to the spectator.
    SendClientMessage(playerid,0x0080C0FF,String);//Sending the formatted message to the spectator.
    IsSpecing[playerid] = 1;// Just saying that the spectator has begun to spectate someone.
    IsBeingSpeced[id] = 1;// Just saying that a player is being spectated (You'll see where this comes in)
    spectatorid[playerid] = id;// Saving the spectator's id into this variable.
    return 1;// Returning 1 - saying that the command has been sent.
}
Reply
#6

Use ZCMD like a stock.

Doesn't put it in a public '-'
Reply
#7

You dont need to use " OnPlayerCommandText " Just directly use making your command :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
this was also wronge :
Reply
#8

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Use ZCMD like a stock.

Doesn't put it in a public '-'
I removed the Public done like this:
ZCMD:Spy(playerid, params[])
error:
pawn Код:
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(70) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(72) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(74) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(85) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(87) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(89) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(102) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(104) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(106) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(115) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(117) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(119) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(131) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(133) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(135) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(136) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(155) : warning 203: symbol is never used: "Spy"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


16 Errors.
Quote:
Originally Posted by мυ∂υℓ_вacнα
Посмотреть сообщение
You dont need to use " OnPlayerCommandText " Just directly use making your command :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
this was also wronge :
I removed the Public done like this:
COMMAND:Spy(playerid, params[])
error:
pawn Код:
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(70) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(72) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(74) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(85) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(87) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(89) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(102) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(104) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(106) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(115) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(117) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(119) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(131) : error 017: undefined symbol "foreach"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(133) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(135) : error 017: undefined symbol "i"
C:\Documents and Settings\User\Desktop\שרת פרטי\filterscripts\adminspec.pwn(136) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


16 Errors.
look this:
https://sampforum.blast.hk/showthread.php?tid=298656
Reply
#9

Show us the lines with the "foreach" and the "i" Or download Foreach, here https://sampforum.blast.hk/showthread.php?tid=92679
Reply
#10

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Show us the lines with the "foreach" and the "i" Or download Foreach, here https://sampforum.blast.hk/showthread.php?tid=92679
All lines in this:
pawn Код:
foreach(Player,i)
i download the inc and now its work ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)