PDA

View Full Version : Few errors while trying to make the /spec cmd - zCMD


Wooza
04/04/2012, 12:36 PM
Hey, again.
Thanks for helping whoever helps me, really thanks, if I could give +rep I would give, but unfortunately I have got fews posts for giving +rep as far as I know...
Anyway, here is the errors:


C:\Documents and Settings\Administrator\שולחן העבודה\תיקיות המחשב\קידודים וסקריפטים\-----WIP\-----.pwn(234) : error 017: undefined symbol "IsBeingSpeced"
C:\Documents and Settings\Administrator\שולחן העבודה\תיקיות המחשב\קידודים וסקריפטים\-----WIP\-----.pwn(234) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\שולחן העבודה\תיקיות המחשב\קידודים וסקריפטים\-----WIP\-----.pwn(234) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator\שולחן העבודה\תיקיות המחשב\קידודים וסקריפטים\-----WIP\-----.pwn(234) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\שולחן העבודה\תיקיות המחשב\קידודים וסקריפטים\-----WIP\-----.pwn(234) : 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.


Lines 234:
public OnPlayerDisconnect(playerid, reason)
{
if(IsBeingSpeced[playerid] == 1)//If the player being spectated, disconnects, then turn off the spec mode for the spectator.
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
TogglePlayerSpectating(i,false);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
}
}
}
return 1;
}

[MG]Dimi
04/04/2012, 12:55 PM
do you have new IsBeingSpeced[MAX_PLAYERS];?

Ezay
04/04/2012, 01:02 PM
Ok, So You've Made It?

Yet You've Forgot your Stored Variable?

Orh Yeah?

More like a Copy & Paste.

James Coral
04/04/2012, 02:51 PM
better login in /rcon and use /rcon loadfs adminspec and use /specplayer

Wooza
04/04/2012, 03:37 PM
First of all I have got new IsBeingSpeced[MAX_PLAYERS];
Secondly, no, I didn't copy paste so don't judge, I have just got this unsolved problems,
What appears to be the problem?

TzAkS.
04/04/2012, 03:47 PM
Put this up,where you have and other "new"
new IsBeingSpeced[MAX_PLAYERS];

And on OnPlayerConnect
IsBeingSpeced[playerid] = 0;

TzAkS.
04/04/2012, 03:51 PM
Sorry for 2x post,from lag.

Wooza
04/04/2012, 04:25 PM
Didn't help, sorry...
It just transfers the errors to the line I put OnPlayerConnect..
Any ideas?

Chris1337
04/04/2012, 05:38 PM
Have you red this


Is basicaly ´your code´

http://forum.sa-mp.com/showthread.php?p=1531941#post1531941

Wooza
04/04/2012, 05:47 PM
Yes, and actually I made the spec cmd by this tutorial, and got these errors.

Chris1337
04/04/2012, 06:16 PM
you have the includes?