SA-MP Forums Archive
error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error (/showthread.php?tid=132024)



error - 02manchestera - 06.03.2010

Код:
forward Event();
public Event()
{
    switch(random(1)) //could be removed if <= 1
{
    case 0:
{
    for(new i; i < MAX_PLAYERS; i++)
{
    switch(random(5)) //random(5) returns a number from 0 till 4 (0, 1, 2, 3 or 4)
{
    case 0: SetPlayerPos(i, 1.0, 2.0, 3.0);
    case 1: SetPlayerPos(i, 2.0, 3.0, 4.0);
    case 2: SetPlayerPos(i, 3.0, 4.0, 5.0);
    case 3: SetPlayerPos(i, 4.0, 5.0, 1.0);
    case 4: SetPlayerPos(i, 5.0, 1.0, 2.0);
    default: print("ERROR: Undefined teleport!");
}
}
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1569) : error 030: compound statement not closed at the end of file (started at line 1557)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Any one no and there isn't a line 1569


Re: error - dice7 - 06.03.2010

Indent your code and you'll see the problem


Re: error - [WSM]Deadly_Evil - 06.03.2010

Add in the last line:
pawn Код:
return 1;
}



Re: error - 02manchestera - 06.03.2010

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1561) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1562) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1563) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1565) : error 002: only a single statement (or expression) can follow each "case"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1565) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1568) : error 030: compound statement not closed at the end of file (started at line 1557)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
i get this now



Re: error - aircombat - 06.03.2010

forward Event();
public Event()
{
switch(random(1)) //could be removed if <= 1
{
case 0:
{
for(new i; i < MAX_PLAYERS; i++)
{
switch(random(5)) //random(5) returns a number from 0 till 4 (0, 1, 2, 3 or 4)
{
case 0: SetPlayerPos(i, 1.0, 2.0, 3.0);
case 1: SetPlayerPos(i, 2.0, 3.0, 4.0);
case 2: SetPlayerPos(i, 3.0, 4.0, 5.0);
case 3: SetPlayerPos(i, 4.0, 5.0, 1.0);
case 4: SetPlayerPos(i, 5.0, 1.0, 2.0);
default: print("ERROR: Undefined teleport!");
}
}
}
}
return 1;
}
________
SCOTTISH RECIPES