26.06.2014, 13:22
Hey all
I have a problem.
SO I have this code:
and I get these errors:
The lines:
609: UnderAttack[Zone] = 0; //Stopping the UnderAttack
610: KillTimer(timer[playerid][Zone]); //Killing the timer
I know how to fix it, but there is no argument for the which zone it is? I hope you guys can understand what I'm trying to say, lol.
For example:
I want to do
(UEZone is UndeadEnemiesZone)
and the other zones, too.
Here are my variables and defines:
Any help is appreciated, and if you need more code/info, let me know please.
I have a problem.
SO I have this code:
Код:
forward SetZone(playerid); public SetZone(playerid) { SetPlayerScore(playerid, GetPlayerScore(playerid) + 3); //Giving score and money GivePlayerMoney(playerid, 3000); SendClientMessage(playerid,GREEN,"Congratulation! You have Gained 3 Scores & 3000$ Money "); UnderAttack[Zone] = 0; //Stopping the UnderAttack KillTimer(timer[playerid][Zone]); //Killing the timer SetGangZone(playerid); //We will define it.. return 1; }
Код:
C:\Users\x\Desktop\x\gamemodes\x.pwn(609) : error 033: array must be indexed (variable "Zone") C:\Users\x\Desktop\x\gamemodes\x.pwn(610) : error 033: array must be indexed (variable "Zone")
609: UnderAttack[Zone] = 0; //Stopping the UnderAttack
610: KillTimer(timer[playerid][Zone]); //Killing the timer
I know how to fix it, but there is no argument for the which zone it is? I hope you guys can understand what I'm trying to say, lol.
For example:
I want to do
Код:
KillTimer(timer[playerid][UEZone]); //Killing the timer
and the other zones, too.
Here are my variables and defines:
Код:
//Capture Zone Variables new CP[4]; new Zone[4]; new tCheck[4]; new zDefine[MAX_PLAYERS]; new UnderAttack[4]; new timer[MAX_PLAYERS][4]; //Capture Zone Defines #define UEZone 0 #define CZone 1 #define BBZone 2 #define PDZone 3