i 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: i need help! (
/showthread.php?tid=492389)
i need help! -
Youssef214 - 03.02.2014
i get these following errors
pawn Код:
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1276) : error 028: invalid subscript (not an array or too many subscripts): "timer"
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1276) : warning 215: expression has no effect
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1276) : error 001: expected token: ";", but found "]"
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1276) : error 029: invalid expression, assumed zero
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1276) : 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.
On these lines:
pawn Код:
if(checkpointid == GTurf)
{
if(tCP[Grove] == gTeam[playerid]) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already captured by your team");
if(UnderAttack[Grove] == 1) return SendClientMessage(playerid, 0xF50A0AFF,"This zone is already being taken over!");
UnderAttack[Grove] = 1;
timer[playerid][Grove] = SetTimerEx("G",60000,false,"i", playerid);
SendClientMessage(playerid, 0xFFFB00FF,"You're Capturing this zone! Wait here for 60 Seconds!");
new string[128];
format(string, sizeof(string),"[ATTENTION]: Unity Station is Being taken Over!");
SendClientMessageToAll(0xF50A0AFF,string);
iCP[playerid] = Grove;
}
How To Fix This Problem?
Re: i need help! -
BullseyeHawk - 03.02.2014
Show us your timer decleration.
The:
Should be located at the top of your script, by the seems of it.
Re: i need help! -
Youssef214 - 03.02.2014
lol i made it on new timer;
as normal
Re: i need help! -
Youssef214 - 03.02.2014
pawn Код:
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(28) : error 009: invalid array size (negative, zero or out of bounds)
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1403) : error 035: argument type mismatch (argument 1)
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1411) : error 035: argument type mismatch (argument 1)
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1419) : error 035: argument type mismatch (argument 1)
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1427) : error 035: argument type mismatch (argument 1)
D:\Gta San Andreas Multiplayer\Gta San Andreas Multiplayer\LSGW2.pwn(1435) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Re: i need help! -
BullseyeHawk - 03.02.2014
I didn't mean like that, you need to declare array sizes inside of it.
pawn Код:
// MAX_PLAYERS = maximum players that can join the server, slots.
// MAX_ZONES = maximum zones that can be initated, tho I think this is already in usage.
// Attempt to use MAX_CAPTURE_ZONES in a #define.
new timer[MAX_PLAYERS][MAX_ZONES];
You're using two arrays, so you need to create two arrays for timer.
Код:
new timer[ARRAY_SIZE_1][ARRAY_SIZE_2];
https://sampwiki.blast.hk/wiki/Scripting_Basics#Arrays