Question

Привет всем. Начал писать чат, появилось дохреналион ошибок, прикреплю сами ошибки и код. Дайте намёк, как исправить их. Заранее спасибки!

 

Сами ошибки:

 

 


C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(384) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(386) : error 029: invalid expression, assumed zero
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : warning 217: loose indentation
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(388) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(388) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(389) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(389) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(390) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(392) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(396) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(399) : error 010: invalid function or declaration
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(195) : warning 204: symbol is assigned a value that is never used: "mysql"
Pawn compiler 3.2.3664     Copyright (c) 1997-2006, ITB CompuPhase
 

 

 

Код:

 

 


stock ProxDetector(Float:radius, text[], color1 = 0xFFFFFFFF, color2 = 0xEAEAEAFF)
{
 
   GetPlayerPos(i, x, y, z);
   new world = GetPlayerVirtualWorld(playerid),
    interior = GetPlayerInterior(playerid);
   for(new 1; 1 < MAX_PLAYERS; 1++)
   {
    if(!IsPlayerConnected(1)) continue;
    if(!IsPlayerInRangeOfPoint(i, radius, x, y, z))continue;
    if(world == GetPlayerVirtualWorld(i))continue;
    if(interior != GetPlayerInterior(i))continue;
    if(IsPlayerInRangeOfPoint(i, radius / 2, x, y, z))
    {
   SendClientMessage(i, color1, text);
    }
    else
    {
   SendClientMessage(i, color2, text);
    }
   }
   return 1;
}
 

 

И паблик

 

 


public OnPlayerText(playerid, text[])
{
    ProxDetector(playerid, 20.0, text);
 return 0;
}
 

 

 

 

Share this post


Link to post

2 answers to this question

  • 0

Начнём с того, что Вы в stock ProxDetector не добавили ту самую i .

stock ProxDetector(i, Float:radius, text[], color1 = 0xFFFFFFFF, color2 = 0xEAEAEAFF)
{
 
   GetPlayerPos(i, x, y, z);
   new world = GetPlayerVirtualWorld(playerid),
    interior = GetPlayerInterior(playerid);
   for(new 1; 1 < MAX_PLAYERS; 1++)
   {
    if(!IsPlayerConnected(1)) continue;
    if(!IsPlayerInRangeOfPoint(i, radius, x, y, z))continue;
    if(world == GetPlayerVirtualWorld(i))continue;
    if(interior != GetPlayerInterior(i))continue;
    if(IsPlayerInRangeOfPoint(i, radius / 2, x, y, z))
    {
   SendClientMessage(i, color1, text);
    }
    else
    {
   SendClientMessage(i, color2, text);
    }
   }
   return 1;
}

 

Share this post


Link to post
  • 0

Тему можно закрывать, нашёл свои ошибки и исправил их. Спасибо.

Share this post


Link to post
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Владислав2
      By Владислав2
      Здравствуйте, при компиляции появляется ошибка,

      Ошибка:
      error 017: undefined symbol "REP_KUZIA_TD"

      Строки:
       
          REP_KUZIA_TD[0] = TextDrawCreate(7.499990, 314.444396, "REP: 1");
          TextDrawLetterSize(REP_KUZIA_TD[0], 0.400000, 1.600000);
          TextDrawAlignment(REP_KUZIA_TD[0], 1);
          TextDrawColor(REP_KUZIA_TD[0], -1);
          TextDrawSetShadow(REP_KUZIA_TD[0], 0);
          TextDrawSetOutline(REP_KUZIA_TD[0], 1);
          TextDrawBackgroundColor(REP_KUZIA_TD[0], 255);
          TextDrawFont(REP_KUZIA_TD[0], 1);
          TextDrawSetProportional(REP_KUZIA_TD[0], 1);
          TextDrawSetShadow(REP_KUZIA_TD[0], 0);
          REP_KUZIA_TD[1] = TextDrawCreate(6.249957, 330.518493, "ASK: 0");
          TextDrawLetterSize(REP_KUZIA_TD[1], 0.400000, 1.600000);
          TextDrawAlignment(REP_KUZIA_TD[1], 1);
          TextDrawColor(REP_KUZIA_TD[1], -1);
          TextDrawSetShadow(REP_KUZIA_TD[1], 0);
          TextDrawSetOutline(REP_KUZIA_TD[1], 1);
          TextDrawBackgroundColor(REP_KUZIA_TD[1], 255);
          TextDrawFont(REP_KUZIA_TD[1], 1);
          TextDrawSetProportional(REP_KUZIA_TD[1], 1);
          TextDrawSetShadow(REP_KUZIA_TD[1], 0);
          return 1;
      }

      Буду рад если кто-то поможет