[Ajuda] Minigame
#1

PHP код:
C:\Users\Helbim\Desktop\Minegame.pwn(84) : error 001expected token";"but found "-identifier-"
C:\Users\Helbim\Desktop\Minegame.pwn(85) : error 001expected token";"but found "-identifier-"
C:\Users\Helbim\Desktop\Minegame.pwn(100) : error 018initialization data exceeds declared size
C
:\Users\Helbim\Desktop\Minegame.pwn(160) : error 052multi-dimensional arrays must be fully initialized
C
:\Users\Helbim\Desktop\Minegame.pwn(180) : error 001expected token"-string end-"but found "-identifier-"
C:\Users\Helbim\Desktop\Minegame.pwn(180) : error 017undefined symbol "N"
C:\Users\Helbim\Desktop\Minegame.pwn(180) : error 029invalid expressionassumed zero
C
:\Users\Helbim\Desktop\Minegame.pwn(180) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
8 Errors

Alguem ajuda tirar esse error pfv ?

Minigame > Aqui
Reply
#2

manda ae as linhas que dao erro e mais facil
Reply
#3

Mano meu amigo mim passo um site, tabulador.medianewsonline.com , Fui usar ele e deu uma chave, tirei essa chave й tiro todos os errors e so sobraram esses 2

PHP код:
C:\Users\Helbim\Desktop\DontGetWet.pwn(420) : error 001expected token"*/"but found "-end of file-"
C:\Users\Helbim\Desktop\DontGetWet.pwn(420) : error 013no entry point (no public functions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Usei denovo, tirei essa chave do comeзo deu 10 errors ai voltei com a chave

As linhas vгo ate 419, nгo tem 420

Tenha paciencia pa mim ajudar pfv pq burro e foda kk
Reply
#4

Quote:
Originally Posted by Helbim
Посмотреть сообщение
Mano meu amigo mim passo um site, tabulador.medianewsonline.com , Fui usar ele e deu uma chave, tirei essa chave й tiro todos os errors e so sobraram esses 2

PHP код:
C:\Users\Helbim\Desktop\DontGetWet.pwn(420) : error 001expected token"*/"but found "-end of file-"
C:\Users\Helbim\Desktop\DontGetWet.pwn(420) : error 013no entry point (no public functions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Usei denovo, tirei essa chave do comeзo deu 10 errors ai voltei com a chave

As linhas vгo ate 419, nгo tem 420

Tenha paciencia pa mim ajudar pfv pq burro e foda kk
Amigo vc ja viu isso em algum lugar?
Quote:

/* este code й inutil */

este sinal (/*) й como
Quote:

//este code й inutil

n sei explicar a diferenзa entre os 2, ambos tem a mesma finalidade... E vendo o erro, diz la "*/" vб atй a linha 420 e axe esse */ e deleta ele, sу ele e veja o q deu, se tiver mais algum erro posta ai!
Reply
#5

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Amigo vc ja viu isso em algum lugar? este sinal (/*) й como n sei explicar a diferenзa entre os 2, ambos tem a mesma finalidade... E vendo o erro, diz la "*/" vб atй a linha 420 e axe esse */ e deleta ele, sу ele e veja o q deu, se tiver mais algum erro posta ai!
Quote:
Originally Posted by PT
Посмотреть сообщение
na verdade acho que tem de procurar 1 /*
Tipo, eu ja tirei uma chave /* e so deu esses 2 error, й tirei a /* do comeзo tambйm, й deu foi 10 errors, ai coloquei ela denovo no comeзo

#Edit

Coloquei essa chave na linha 420 й agora so tem um error

PHP код:
C:\Users\Helbim\Desktop\DontGetWet.pwn(421) : error 013no entry point (no public functions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Tipo fechei o */ й /* =D
Reply
#6

Quote:
Originally Posted by Helbim
Посмотреть сообщение
Tipo, eu ja tirei uma chave /* e so deu esses 2 error, й tirei a /* do comeзo tambйm, й deu foi 10 errors, ai coloquei ela denovo no comeзo

#Edit

Coloquei essa chave na linha 420 й agora so tem um error

PHP код:
C:\Users\Helbim\Desktop\DontGetWet.pwn(421) : error 013no entry point (no public functions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Tipo fechei o */ й /* =D

Posta a linha 421, melhor... Poste o code inteiro
Reply
#7

Quote:
Originally Posted by F1N4L
Посмотреть сообщение

Posta a linha 421, melhor... Poste o code inteiro
Nгo tem linha 421 man *--*

#Edit

PHP код:
/*                                           ________________________________
                      __,__                 (                                )
             .--.  .-"     "-.  .--.        ( Monky fix, good now, happy be!)
            / .. \/  .-. .-.  \/ .. \       (       Keep the credits!         )
           | |  '|  /   Y   \  |'  | |    /    (                                  )
           | \   \  \ 0 | 0 /  /   / |   /   ЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇ
            \ '- ,\.-"`` ``"-./, -' /   /
             `'-' /_   ^ ^   _\ '-'`   /
             .--'|  \._ _ _./  |'--.
           /`    \   \.-.  /   /    `\
          /       '._/  |-' _.'       \
         /          ;  /--~'   |       \
        /        .'\|.-\--.     \       \
       /   .'-. /.-.;\  |\|'~'-.|\       \
       \       `-./`|_\_/ `     `\'.      \
        '.      ;     ___)        '.`;    /
          '-.,_ ;     ___)          \/   /
           \   ``'------'\       \   `  /
            '.    \       '.      |   ;/_
          ___>     '.       \_ _ _/   ,  '--.
        .'   '.   .-~~~~~-. /     |--'`~~-.  \
       // / .---'/  .-~~-._/ / / /---..__.'  /
      ((_(_/    /  /      (_(_(_(---.__    .'
                | |     _              `~~`
                | |     \'.
                 \ '....' |
                  '.,___.'
        #Name: [FilterScript]Don't Get Wet
        #Author: iMonk3y
        #Release Date: 31/01/2011
        #Credits:
            ¤ zcmd             - Zeex      (https://sampforum.blast.hk/showthread.ph...0.79310576
            ¤ foreach       - ******    (https://sampforum.blast.hk/showthread.ph...0.79310576
*/
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <foreach>
#define isodd(%1) \
    
((%1) & 0x01)
#define iseven(%1) \
    
(!isodd((%1)))
#define ALL_PLAYERS     200     //Define number of players on your server
#define MAX_SLOTS         54      //Don't change this
#define PRIZE_MONEY     10000
#define LIME         0x88AA62FF
#define WHITE         0xFFFFFFAA
#define RULE         0xFBDF89AA
#define ORANGE         0xDB881AAA
#define COL_LIME    \
    
"{88AA62}"
#define COL_WHITE     \
    
"{FFFFFF}"
#define COL_RULE       \
    
"{FBDF89}"
#define COL_ORANGE    \
    
"{DB881A}"
forward SpeedUpobjectFloat:xFloat:yFloat:z);
forward RespawnPlayerplayer );
forward MinigameWinnerplayer );
forward MinigameCountdown( );
forward MinigameUpdate( );
forward EndMinigame( );
new 
bool:Minigamer_[ALL_PLAYERS char];
new 
bool:VIEW_FROM_ABOVE;
new 
inProgressuTimer;
new 
Objects_[2][MAX_SLOTS];
new 
pWeaponData[ALL_PLAYERS][13];
new 
pSavedAmmo[ALL_PLAYERS][13];
new 
Float:pCoords[ALL_PLAYERS][3];
new 
pInterior[ALL_PLAYERS];
new 
Iterator:_Minigamer    <MAX_SLOTS>;
new 
Iterator:_Objects    <MAX_SLOTS>;
new 
pReadyText[4][64] =
{
    
"~n~ ~n~ ~n~ ~y~stand by...",
    
"~n~ ~n~ ~n~ ~y~get Ready!",
    
"~n~ ~n~ ~n~ ~y~are you ready?",
    
"~n~ ~n~ ~n~ ~y~ready to get wet?"
};
new 
pFellOffText[5][28] =
{
    
"~n~ ~r~hosed",
    
"~n~ ~r~all wet",
    
"~n~ ~r~no swimming",
    
"~n~ ~r~you're drowning!",
    
"~n~ ~r~water... baaad!"
};
new 
Float:gCoords[MAX_SLOTS][3] = {
    
    { -
5309.198120,-199.052383,22.593704 },
    { -
5309.198120,-195.786071,22.593704 },
    { -
5309.198120,-192.510620,22.593704 },
    { -
5309.198120,-189.250564,22.593704 },
    { -
5309.198120,-185.987960,22.593704 },
    { -
5309.198120,-182.727081,22.593704 },
    { -
5309.198120,-179.463394,22.593704 },
    { -
5309.198120,-176.205261,22.593704 },
    { -
5304.841796,-176.205261,22.593704 },
    { -
5304.841796,-179.468795,22.593704 },
    { -
5304.841796,-182.737884,22.593704 },
    { -
5304.841796,-185.989654,22.593704 },
    { -
5304.841796,-189.259185,22.593704 },
    { -
5304.841796,-192.518615,22.593704 },
    { -
5304.841796,-195.785491,22.593704 },
    { -
5304.841796,-199.054733,22.593704 },
    { -
5300.489990,-199.054733,22.593704 },
    { -
5300.489990,-195.782165,22.593704 },
    { -
5300.489990,-192.531250,22.593704 },
    { -
5300.489990,-189.274765,22.593704 },
    { -
5300.489990,-186.003005,22.593704 },
    { -
5300.489990,-182.735229,22.593704 },
    { -
5300.489990,-179.471069,22.593704 },
    { -
5300.489990,-176.208007,22.593704 },
    { -
5296.138061,-176.208007,22.593704 },
    { -
5296.138061,-179.479248,22.593704 },
    { -
5296.138061,-182.744735,22.593704 },
    { -
5296.138061,-186.002944,22.593704 },
    { -
5296.138061,-189.274505,22.593704 },
    { -
5296.138061,-192.533691,22.593704 },
    { -
5296.138061,-195.788970,22.593704 },
    { -
5296.138061,-199.048782,22.593704 },
    { -
5291.776000,-199.050140,22.593704 },
    { -
5291.776000,-195.790634,22.593704 },
    { -
5291.776000,-192.542922,22.593704 },
    { -
5291.776000,-189.277542,22.593704 },
    { -
5291.776000,-186.013275,22.593704 },
    { -
5291.776000,-182.742355,22.593704 },
    { -
5291.776000,-179.475021,22.593704 },
    { -
5291.776000,-176.215805,22.593704 },
    { -
5287.432250,-176.215805,22.593704 },
    { -
5287.432250,-179.485168,22.593704 },
    { -
5287.432250,-182.739608,22.593704 },
    { -
5287.432250,-186.016723,22.593704 },
    { -
5287.432250,-189.277816,22.593704 },
    { -
5287.432250,-192.539001,22.593704 },
    { -
5287.432250,-195.796325,22.593704 },
    { -
5287.432250,-199.053771,22.593704 },
    { -
5287.431274,-202.320648,22.593704 },
    { -
5291.781616,-202.320648,22.593704 },
    { -
5296.136718,-202.320648,22.593704 },
    { -
5300.493652,-202.320648,22.593704 },
    { -
5304.848876,-202.320648,22.593704 },
    { -
5309.201660,-202.320648,22.593704 }
};
public 
OnFilterScriptInit( )
{
    return 
1;
}
public 
OnFilterScriptExit( )
{
    if( 
inProgress EndMinigame( );
    return 
1;
}
public 
OnPlayerDisconnectplayeridreason )
{
    new 
str[128];
    if( 
Minigamer_playerid } == true )
    {
        if( 
inProgress )
        {
               
formatstrsizeofstr ), "* %s "COL_RULE"has dropped out of "COL_ORANGE"Don't Get Wet"COL_RULE" minigame, "COL_LIME"rank %d"PlayerNameplayerid ), Iter_Count(_Minigamer ) );
            
SendClientMessageToAllLIMEstr );
            
Iter_Remove(_Minigamerplayerid );
            
Minigamer_playerid } = false;
            if( 
Iter_Count(_Minigamer ) < )
            {
                foreach(
_MinigamerMinigameWinner);
            }
        }
        else
        {
            
Iter_Remove(_Minigamerplayerid );
            
Minigamer_playerid } = false;
        }
    }
    return 
1;
}
public 
OnPlayerDeathplayeridkilleridreason )
{
    new 
str[128];
    if( 
Minigamer_playerid } == true )
    {
        if( 
inProgress )
        {
               
formatstrsizeofstr ), "* %s "COL_RULE"has dropped out of "COL_ORANGE"Don't Get Wet"COL_RULE" minigame, "COL_LIME"rank %d"PlayerNameplayerid ), Iter_Count(_Minigamer ) );
            
SendClientMessageToAllLIMEstr );
            
Iter_Remove(_Minigamerplayerid );
            
Minigamer_playerid } = false;
            if( 
Iter_Count(_Minigamer ) < )
            {
                foreach(
_MinigamerMinigameWinner);
            }
        }
        else
        {
            
SendClientMessageplayeridLIME"Your sign up for "COL_ORANGE"Don't Get Wet"COL_LIME" minigame has been cancelled." );
            
Iter_Remove(_Minigamerplayerid );
            
Minigamer_playerid } = false;
        }
    }
    return 
1;
}
CMD:getwetplayeridparams[] )
{
    if( 
GetPlayerStateplayerid ) == PLAYER_STATE_WASTED )
        return 
SendClientMessageplayeridLIME"Command is temporary disabled because you're wasted." );
    else if( 
Minigamer_playerid } != false )
        return 
SendClientMessageplayeridLIME"You have already signed up for "COL_ORANGE"Don't Get Wet"COL_LIME" minigame." );
    else if( 
inProgress )
        return 
SendClientMessageplayeridORANGE"Don't Get Wet "COL_LIME"minigame is currently in progress, please wait." );
    else if( 
Iter_Count(_Minigamer ) > MAX_SLOTS-)
        return 
SendClientMessageplayeridORANGE,"Don't Get Wet "COL_LIME"minigame is already full. Please wait untill it ends." );
    if( 
inProgress )
    {
        if( 
strcmpparams"1"true ) == )
        
VIEW_FROM_ABOVE true;
        else if( 
strcmpparams"2"true ) == )
        
VIEW_FROM_ABOVE false;
        else return 
SendClientMessageplayeridWHITE"Use: /getwet [1 or 2]" );
        new 
str[128];
        
Minigamer_playerid } = true;
        
Iter_Add(_Minigamerplayerid );
        
formatstrsizeofstr ), "Don't Get Wet v.%i.0 "COL_RULE"minigame will start in 20 seconds. Type "COL_ORANGE"/getwet "COL_RULE"to join!"strval(params) );
        
SendClientMessageToAllORANGEstr );
        
SetTimer"MinigameCountdown"20000);
        for( new 
iMAX_SLOTSi++ )
        {
            
//The object (window) is only visible from one side
            
Objects_[0][i] = CreateObject1649gCoords[i][0], gCoords[i][1], gCoords[i][2], -90.0000000.0000000.000000150.0 );
            if(!
VIEW_FROM_ABOVE//In case /getwet 2, we need to multiply number of objects and turn them around so players would be able to see them from below
            
Objects_[1][i] = CreateObject1649gCoords[i][0], gCoords[i][1], gCoords[i][2], -270.0000000.0000000.000000150.0 );
            
Iter_Add(_Objects);
        }
        
inProgress 1;
    }
    else
    {
        
Minigamer_playerid } = true;
         
Iter_Add(_Minigamerplayerid );
        
SendClientMessageplayeridRULE,"You have signed up for "COL_ORANGE"Don't Get Wet "COL_RULE"minigame." );
    }
    return 
1;
}
public 
MinigameCountdown( )
{
    if( 
Iter_Count(_Minigamer ) < //End minigame if there aren't enough sign ups
    
{
        
SendClientMessageToAllLIME,"There wasn't enough players to start "COL_ORANGE"Don't Get Wet"COL_LIME" minigame." );
        foreach(
_MinigameriMinigamer_} = false;
        return 
EndMinigame( );
    }
    if( 
inProgress != )
    {
        new 
spot;
        foreach(
_Minigamer)
        {
             
GetPlayerPosipCoords[i][0], pCoords[i][1], pCoords[i][2]);
             
pInterior[i] = GetPlayerInterior);
             for( new 
a13a++ )
            {
                  
GetPlayerWeaponDataiapWeaponData[i][a], pSavedAmmo[i][a] );
              }
            
ResetPlayerWeapons);
            
SetPlayerInteriori);
            
spot Iter_Random(_Objects );
             
GameTextForPlayeripReadyTextrandomsizeofpReadyText ) ) ], 2050);
             
Iter_Remove(_Objectsspot );
             
SetPlayerCameraPosi, -5298.4814,-218.4391,42.1386);
             
SetPlayerCameraLookAti, -5298.1616,-189.6903,23.6564);
             
TogglePlayerControllableifalse );
            
SetPlayerPosigCoords[spot][0], gCoords[spot][1], gCoords[spot][2] +0.5 );
        }
        
Iter_Clear(_Objects);
        for( new 
iMAX_SLOTSi++ ) Iter_Add(_Objects);
        
SetTimer"MinigameCountdown"2000);
        
inProgress 2;
    }
    else
    {
        foreach(
_Minigamer)
        {
            if(!
VIEW_FROM_ABOVE)
            
SetCameraBehindPlayer);
            
PlayerPlaySoundi10570.00.00.0 );
            
TogglePlayerControllableitrue );
        }
        
uTimer SetTimer"MinigameUpdate"2500);
    }
    return 
1;
}
public 
MinigameUpdate( )
{
    if( 
Iter_Count(_Minigamer ) < ) return EndMinigame( );
    
    new 
str[128], Float:playerxFloat:playeryFloat:playerz[ALL_PLAYERS];
    foreach(
_Minigamer)
    {
        
GetPlayerPosiplayerxplayeryplayerz[i] );
        if( 
playerz[i] < 2.0 //Checks if player is in the water
        
{
            
formatstrsizeofstr ), "* %s "COL_RULE"has dropped out of "COL_ORANGE"Don't Get Wet"COL_RULE" minigame, "COL_LIME"rank %d"PlayerName), Iter_Count(_Minigamer ) );
            
SendClientMessageToAllLIMEstr );
            
GameTextForPlayeripFellOffTextrandomsizeofpFellOffText ) ) ], 2500);
            
Iter_Remove(_Minigamer);
            
Minigamer_} = false;
            
RespawnPlayer);
        }
    }
    if( 
Iter_Count(_Minigamer ) < )
    {
         foreach(
_MinigamerMinigameWinner);
    }
     new 
objectidFloat:ObjectXFloat:ObjectYFloat:ObjectZ;
    if(!
VIEW_FROM_ABOVE)
    {
         foreach(
_Objects)
        {
            if( 
isoddrandom10 ) ) )
            {
                 
GetObjectPosObjects_[0][i], ObjectXObjectYObjectZ );
                
MoveObjectObjects_[0][i], ObjectXObjectYObjectZ -1.50.2 );
                   
MoveObjectObjects_[1][i], ObjectXObjectYObjectZ -1.50.2 );
            }
            else
            {
                
GetObjectPosObjects_[0][i], ObjectXObjectYObjectZ );
                
MoveObjectObjects_[0][i], ObjectXObjectYObjectZ +1.50.2 );
                
MoveObjectObjects_[1][i], ObjectXObjectYObjectZ +1.50.2 );
            }
        }
    }
     
objectid Iter_Random(_Objects );
    
GetObjectPosObjects_[0][objectid], ObjectXObjectYObjectZ );
    
SetTimerEx("SpeedUp"5000"ifff"objectidObjectXObjectYObjectZ);
    
MoveObjectObjects_[0][objectid], ObjectXObjectYObjectZ -5);
    if(!
VIEW_FROM_ABOVE)
    
MoveObjectObjects_[1][objectid], ObjectXObjectYObjectZ -5);
    
Iter_Remove(_Objectsobjectid );
    return 
1;
}
public 
SpeedUpobjectFloat:xFloat:yFloat:)
{
    
MoveObjectObjects_[0][object], xy-15020 );
    if(!
VIEW_FROM_ABOVE)
    
MoveObjectObjects_[1][object], xy-15020 );
    foreach(
_MinigamerPlayerPlaySoundi10390.00.00.0 );
}
public 
EndMinigame( )
{
    for( new 
iMAX_SLOTSi++ )
     {
         
DestroyObjectObjects_[0][i] );
         if(!
VIEW_FROM_ABOVE)
         
DestroyObjectObjects_[1][i] );
     }
     
inProgress 0;
    
Iter_Clear(_Objects );
    
Iter_Clear(_Minigamer );
    
KillTimeruTimer );
    return 
1;
}
public 
MinigameWinnerplayer )
{
    new 
str[128];
    
formatstrsizeofstr ), "* %s "COL_RULE"has won "COL_ORANGE"Don't Get Wet "COL_RULE"minigame!"PlayerNameplayer ) );
    
SendClientMessageToAllLIMEstr );
     
GivePlayerMoneyplayerPRIZE_MONEY );
     
Minigamer_player } = false;
    
Iter_Remove(_Minigamerplayer );
    
SetTimerEx"RespawnPlayer"14000"i"player );
    
SetTimer"EndMinigame"17000);
}
public 
RespawnPlayer player )
{
    for( new 
12> -1i-- )
    {
        
GivePlayerWeaponplayerpWeaponData[player][i], pSavedAmmo[player][i] );
    }
    
SetPlayerPosplayerpCoords[player][0], pCoords[player][1], pCoords[player][2] );
       
SetPlayerInteriorplayerpInterior[player] );
       
SetCameraBehindPlayerplayer );
}
stock PlayerNameplayerid )
{
    new 
Name[MAX_PLAYER_NAME];
    
GetPlayerNameplayeridNamesizeofName ) );
    return 
Name;

Reply
#8

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Amigo vc ja viu isso em algum lugar? este sinal (/*) й como n sei explicar a diferenзa entre os 2, ambos tem a mesma finalidade... E vendo o erro, diz la "*/" vб atй a linha 420 e axe esse */ e deleta ele, sу ele e veja o q deu, se tiver mais algum erro posta ai!
Passa sua include foreach?
Reply
#9

Quote:
Originally Posted by ThiagoMK
Посмотреть сообщение
Passa sua include foreach?

fiz agora upload, pega aki: foreach
Reply
#10

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
fiz agora upload, pega aki: foreach
Ele nгo tinha a include.. Poriзo tava dando erros e aqui deu nem warning depois que coloquei a sua include. Thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)