Question

При компиляции мода выдаёт ошибку:

F:\mod crmp\Моды\Мод\gamemodes\new.pwn(11642) : error 017: undefined symbol "mysql_query_string"
F:\mod crmp\Моды\Мод\gamemodes\new.pwn(11642) : error 017: undefined symbol "string"
F:\mod crmp\Моды\Мод\gamemodes\new.pwn(11642) : error 029: invalid expression, assumed zero
F:\mod crmp\Моды\Мод\gamemodes\new.pwn(11642) : fatal error 107: too many error messages on one line


Код:

if(PlayerToPoint(3.0, playerid, -745.8836,-129.1777,65.9046))
{
        RemovePlayerAttachedObject(playerid,0);
        RemovePlayerAttachedObject(playerid,1);
        RemovePlayerAttachedObject(playerid,2);
        SetPlayerAttachedObject(playerid,0,341,6);
        DisablePlayerCheckpoint(playerid);
        new ggg[MAX_PLAYERS];
        ggg[playerid] = 8+random(21);
        AllPlayerDrova[playerid] +=ggg[playerid];
        format(mysql_query_string, sizeof(string), "Всего заработано {FFA500}%d{FFFFFF} рублей. ", ggg[playerid]);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), "+%d", ggg[playerid]);
        SetPlayerChatBubble(playerid, string, 0x00FF00FF20.03000);
        ggg[playerid] = 0;
        format(mysql_query_string, sizeof(string), "Ваш заработок составляет: {00ff00}%d.", AllPlayerDrova[playerid]);
        SendClientMessage(playerid, -1, mysql_query_string);
        SetPlayerSpecialAction(playerid, 0);
        new id = RandomEx(0,4);
        SetPlayerCheckpoint(playerid,RandomWood[id][0],RandomWood[id][1],RandomWood[
id][2],1.0);

}

 

Заметка от DEST , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post
Share on other sites

10 answers to this question

  • 1

@Ragozin сделай глобальной или локальной переменную: string,mysql_query_string

new string[90],,mysql_query_string[120];

 

Share this post


Link to post
Share on other sites
  • 0

@Antoxa39 Помогло, но немножко. Вылезла новая проблема

public OnPlayerPickUpPickupEx(playerid, pickupid, action_type, action_id)
{
    if(pickupid == narad1)
    {
    if(!PlayerInfo[playerid][pWork]) ShowPlayerDialog(playerid,NARAD1,0,"????? ??????????","{FFFFFF} ?? ?????????? ??? ?????? {FFA500}????????.\n{FFFFFF} ???? ?????? ??????? ? ???, ????? ?????? ??????? \n ? ?????? ????? ?? ???????????.\n\n\t\t{FFFFFF}    ?? ?????????\n","??","???")
    else if(PlayerInfo[playerid][pWork] == 1) ShowPlayerDialog(playerid,NARAD1,0,"?????????? ??????.","?? ?????? ????????? ?????? ? ??????? ???????","??","???");
    }
Спойлер

F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(11670) : warning 217: loose indentation
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(11693) : warning 217: loose indentation
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(12159) : error 017: undefined symbol "PlayerInfo"
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(12159) : warning 215: expression has no effect
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(12159) : error 001: expected token: ";", but found "]"
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(12159) : error 029: invalid expression, assumed zero
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(12159) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.20150531              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

    if(PlayerToPoint(2.0, playerid, -744.4242,-151.5473,66.9441))
    {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
    }
    if(PlayerToPoint(2.0, playerid, -725.6015,-135.8018,67.9834))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -742.5336,-141.1515,66.6351))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -725.7032,-157.2504,66.8221))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -712.8016,-153.0406,66.2967))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        

    new action_type = GetPlayerCPInfo(playerid, CP_ACTION_TYPE);
    if(IsPlayerInCheckpoint(playerid))
    {
        switch(action_type)
        {
            case CP_ACTION_TYPE_LOADER_JOB_TAKE:
            {
                if(GetPlayerTempJob(playerid) == TEMP_JOB_LOADER)
                {
                    if(GetPlayerTempJobState(playerid) == TEMP_JOB_STATE_LOADER_LOAD)
                    {
                        if(!IsPlayerInAnyVehicle(playerid))
                        {
                            ac_work_time[playerid] = gettime();

                            DisablePlayerCheckpoint(playerid);

                            ClearAnimations(playerid);
                            ApplyAnimationEx(playerid, "CARRY""liftup"4.0000000, USE_ANIM_TYPE_NONE - 1);
                            SetTimerEx("SetPlayerLoaderJobLoad"1000false"i", playerid);
                        }
                    }
                }
            }

 

Share this post


Link to post
Share on other sites
  • 0

@Ragozin скорее всего у тебя переменная с игроком по другому названа

Share this post


Link to post
Share on other sites
  • 0

@Antoxa39 И где её в в этом коде можно поменять?

public OnPlayerPickUpPickupEx(playerid, pickupid, action_type, action_id)
{
    if(pickupid == narad1)
    {
    if(!PlayerInfo[playerid][pWork]) ShowPlayerDialog(playerid,NARAD1,0,"????? ??????????","{FFFFFF} ?? ?????????? ??? ?????? {FFA500}????????.\n{FFFFFF} ???? ?????? ??????? ? ???, ????? ?????? ??????? \n ? ?????? ????? ?? ???????????.\n\n\t\t{FFFFFF}    ?? ?????????\n","??","???")
    else if(PlayerInfo[playerid][pWork] == 1) ShowPlayerDialog(playerid,NARAD1,0,"?????????? ??????.","?? ?????? ????????? ?????? ? ??????? ???????","??","???");
    }
    
if(PlayerToPoint(2.0, playerid, -744.4242,-151.5473,66.9441))
    {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
    }
    if(PlayerToPoint(2.0, playerid, -725.6015,-135.8018,67.9834))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -742.5336,-141.1515,66.6351))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -725.7032,-157.2504,66.8221))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        if(PlayerToPoint(2.0, playerid, -712.8016,-153.0406,66.2967))
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerAttachedObject(playerid,0,341,6);
        ApplyAnimation(playerid,"CHAINSAW","WEAPON_csaw",1.0,1,0,0,0,6000,0);
        SetTimerEx("WoodLoaded",6000,false,"i",playerid);
        }
        

    new action_type = GetPlayerCPInfo(playerid, CP_ACTION_TYPE);
    if(IsPlayerInCheckpoint(playerid))
    {
        switch(action_type)
        {
            case CP_ACTION_TYPE_LOADER_JOB_TAKE:
            {
                if(GetPlayerTempJob(playerid) == TEMP_JOB_LOADER)
                {
                    if(GetPlayerTempJobState(playerid) == TEMP_JOB_STATE_LOADER_LOAD)
                    {
                        if(!IsPlayerInAnyVehicle(playerid))
                        {
                            ac_work_time[playerid] = gettime();

                            DisablePlayerCheckpoint(playerid);

                            ClearAnimations(playerid);
                            ApplyAnimationEx(playerid, "CARRY""liftup"4.0000000, USE_ANIM_TYPE_NONE - 1);
                            SetTimerEx("SetPlayerLoaderJobLoad"1000false"i", playerid);
                        }
                    }
                }
            }

 

Share this post


Link to post
Share on other sites
  • 0

@Ragozin в начале мода посмотри название переменной,в которой хранятся данные игрока

Share this post


Link to post
Share on other sites
  • 0

@Antoxa39 new PlayerFollow[MAX_PLAYERS]; 

?

Share this post


Link to post
Share on other sites
  • 0

@Ragozin ну скорее всего да

 

Share this post


Link to post
Share on other sites
  • 0

@Antoxa39 Что заменить этим нужно?

Share this post


Link to post
Share on other sites
  • 0

@Ragozin 

PlayerInfo на PlayerFollow

Share this post


Link to post
Share on other sites
  • 0

@Antoxa39 Неа, не помогло

Спойлер

F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(14228) : error 001: expected token: ")", but found "["
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(14228) : error 029: invalid expression, assumed zero
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(14228) : warning 215: expression has no effect
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(14228) : error 001: expected token: ";", but found "]"
F:\mod crmp\Моды\Friendly\gamemodes\new.pwn(14228) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.20150531              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Строчка 14228: if (PlayerFollow[playerid][pWork] == 0)

Код:

case NARAD1:
{
    if(!response) return 1;
    if (PlayerFollow[playerid][pWork] == 0// ? ???? ?????? ??????
    {
        PlayerInfo[playerid][pWork] = 1;
        SetPlayerSkin(playerid,16);
        SendClientMessage(playerid,COLOR_WHITE,"Поздравляем. Теперь идите на {0bda51}чекпоинт{FFFFFF}, чтобы срубить дерево.");
        SetPlayerCheckpoint(playerid,-744.4242,-151.5473,66.944,1.0);
        SetPlayerAttachedObject(playerid,0,341,6);
    }
    else if(PlayerInfo[playerid][pWork] == 1)
    {
        PlayerInfo[playerid][pWork] = 0;
        SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
        PlayerInfo[playerid][pMoney] += AllPlayerDrova[playerid]*3;
        format(string, sizeof(string), "Вы закончили работу. Ваш заработок: {00FF00}$%d", AllPlayerDrova[playerid]*3);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), "~b~+%d", AllPlayerDrova[playerid]*3);
        GameTextForPlayer(playerid, string, 30001);
        if(IsPlayerAttachedObjectSlotUsed(playerid,0)) RemovePlayerAttachedObject(playerid,0);
        if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
        if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
        DisablePlayerCheckpoint(playerid);
        AllPlayerDrova[playerid] = 0;
        SetPlayerSpecialAction(playerid, 0);
        return true;
    }

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Roman_venum
      By Roman_venum
      Ошибки в консоле после подключения базы
       
    • Hero_Black228
      By Hero_Black228
      Здравствуйте, хотел бы задать вопрос. Я имею на руках мод Tape RP, и во время проверки автосалона, я покупал авто и оно после покупки появилось в ЛВ, когда автосалон был в ЛС. Так же и с лодками, покупаю и лодка появляется в автосалоне ЛС. Как мне это исправить?