help me
#1

Error
PHP код:
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(322) : warning 202number of arguments does not match definition
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(325) : warning 217loose indentation
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(364) : error 052multi-dimensional arrays must be fully initialized
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(370) : error 052multi-dimensional arrays must be fully initialized
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 029invalid expressionassumed zero
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 029invalid expressionassumed zero
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : warning 215expression has no effect
C
:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 001expected token";"but found "]"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

Script
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    switch(
classid//Cambia gli id delle classi
    
{
        case 
0/* Classe id dei Bloods.*/:
        {
             
SetPlayerTeam(playeridBloods); //Ti setta nei Bloods
             
GameTextForPlayer(playerid"~r~Bloods"10003); //Scritta Bloods
        
}
        
        case 
1/* Classe id dei Crips.*/:
        {
             
SetPlayerTeam(playeridCrips); //Ti setta nei Crips
             
GameTextForPlayer(playerid"~b~Crips, 1000"3); //Scritta Crips
        
}
     }
     return 
1;
}
public 
OnPlayerText(playerid,text[])
{
     if(
text[0] == '!')
     {
         new 
string[128]; GetPlayerName(playeridstringsizeof(string));
         
format(stringsizeof(string), "[Radio] %s: %s"stringtext[1]);
         
printf("%s"string);
         
         for(new 
0MAX_PLAYERSi++)
         {
             if(
IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(iGetPlayerColor(playerid), string);
         }
         return 
0;
     }
     
     return 
1;
}
public 
OnPlayerSpawn(playerid)
{
       if(
GetPlayerTeam(playerid) == Bloods)
       {
             
SetPlayerColor(playeridBloodsColore); //Colore team
             
SetPlayerRandomBloodsSpawn(playerid); /// Nuova linea, spawn random nei bloods
       
}
       else if(
GetPlayerTeam(playerid) == Crips)
       {
             
SetPlayerColor(playeridCripsColore);
             
SetPlayerRandomCripsSpawn(playerid);///// Nuova linea
       
}
}
new 
Float:BloodsRandomSpawns[4][3] = {
    {
1881.4601,-2030.7333,13.3906},
    {
1901.9595,-2058.3523,13.5469},
    {
1353.1327,380.8547,19.4063}
};
new 
Float:CripsRandomSpawns[4][3] = {
    {
1881.4601,-2030.7333,13.3906},
    {
1901.9595,-2058.3523,13.5469},
    {
1353.1327,380.8547,19.4063}
};
forward SetPlayerRandomBloodsSpawn(playerid);
public 
SetPlayerRandomBloodsSpawn(playerid)
{
     new 
rand random(sizeof(BloodsRandomSpawns));
     
SetPlayerPos(playeridBloodsRandomSpawns[rand][0], BloodsRandomSpawn[rand][1], BloodsRandomSpawns[rand][2]); // [rand] means random, [0] = X, [1] = Y, [2] = Z
     
return 1;

Reply
#2

Can you show us the lines where the error is?
Reply
#3

PHP код:
new Float:BloodsRandomSpawns[4][3] = { 
    {
1881.4601,-2030.7333,13.3906}, 
    {
1901.9595,-2058.3523,13.5469}, 
    {
1353.1327,380.8547,19.4063
}; 
new 
Float:CripsRandomSpawns[4][3] = { 
    {
1881.4601,-2030.7333,13.3906}, 
    {
1901.9595,-2058.3523,13.5469}, 
    {
1353.1327,380.8547,19.4063
}; 
That Matrix is not fully initialised decrease its row size
like this
PHP код:
new Float:BloodsRandomSpawns[3][3] = { 
    {
1881.4601,-2030.7333,13.3906}, 
    {
1901.9595,-2058.3523,13.5469}, 
    {
1353.1327,380.8547,19.4063
}; 
new 
Float:CripsRandomSpawns[3][3] = { 
    {
1881.4601,-2030.7333,13.3906}, 
    {
1901.9595,-2058.3523,13.5469}, 
    {
1353.1327,380.8547,19.4063
}; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)