size array prob
#1

fixedddd!!!!!
Reply
#2

pawn Код:
HInfo[i][ownername] = dini_Int(file, "Ownername");
Reply
#3

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
pawn Код:
HInfo[i][ownername] = dini_Int(file, "Ownername");
ownername isnt a integer
Reply
#4

Quote:
Originally Posted by [OC]MestreKiller
Посмотреть сообщение
ownername isnt a integer
The issue is that your "ownername" is not defined as a string. I'm having issues with this myself.

I tried this:

pawn Код:
Info1[256], //in the enum

PlayerQuest[playerid][Info1] = info;

ERROR MESSAGE: error 047: array sizes do not match, or destination array is too small
I could use some help too. :3
Reply
#5

Quote:
Originally Posted by CrucixTM
Посмотреть сообщение
pawn Код:
Info1[256]
256? -.-
But do you an enum or what..?
Reply
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
But do you an enum or what..?
Yes, 256. I tried with 30 first, then increased it to see if it mattered. Here's my whole enum + stock + calling the stock.

pawn Код:
enum pQuest
{
    CurrentSlot,
    Spawn,
    Hilltop,
    Terminal,
    Ranch,
    Montgomery,
    Dillimore,
    Palomino,
    Slot1,
    Slot2,
    Slot3,
    Slot4,
    Slot5,
    Title1[128],
    Title2[128],
    Title3[128],
    Title4[128],
    Title5[128],
    Info1[256],
    Info2[256],
    Info3[256],
    Info4[256],
    Info5[256],
    Reward1[128],
    Reward2[128],
    Reward3[128],
    Reward4[128],
    Reward5[128],
    Float:X1,
    Float:X2,
    Float:X3,
    Float:X4,
    Float:X5,
    Float:Y1,
    Float:Y2,
    Float:Y3,
    Float:Y4,
    Float:Y5,
    Float:Z1,
    Float:Z2,
    Float:Z3,
    Float:Z4,
    Float:Z5,
    Float:R1,
    Float:R2,
    Float:R3,
    Float:R4,
    Float:R5,
    Msg1[128],
    Msg2[128],
    Msg3[128],
    Msg4[128],
    Msg5[128],
    ID1,
    ID2,
    ID3,
    ID4,
    ID5,
}
new PlayerQuest[MAX_PLAYERS][pQuest];
pawn Код:
stock SetQuest(playerid, questid, msg[], title[], info[], reward[], Float:CPX, Float:CPY, Float:CPZ, Float:CPR)
{
    if(PlayerQuest[playerid][Slot1] < 0)
    {
        PlayerQuest[playerid][Slot1] = questid;
        PlayerQuest[playerid][Title1] = title;
        PlayerQuest[playerid][Info1] = info;
        PlayerQuest[playerid][Reward1] = reward;
        PlayerQuest[playerid][Msg1] = msg;
        PlayerQuest[playerid][X1] = CPZ;
        PlayerQuest[playerid][Y1] = CPY;
        PlayerQuest[playerid][Z1] = CPZ;
        PlayerQuest[playerid][R1] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 1;
    }
    else if(PlayerQuest[playerid][Slot2] < 0)
    {
        PlayerQuest[playerid][Slot2] = questid;
        PlayerQuest[playerid][Title2] = title;
        PlayerQuest[playerid][Info2] = info;
        PlayerQuest[playerid][Reward2] = reward;
        PlayerQuest[playerid][Msg2] = msg;
        PlayerQuest[playerid][X2] = CPZ;
        PlayerQuest[playerid][Y2] = CPY;
        PlayerQuest[playerid][Z2] = CPZ;
        PlayerQuest[playerid][R2] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 2;
    }
    else if(PlayerQuest[playerid][Slot3] < 0)
    {
        PlayerQuest[playerid][Slot3] = questid;
        PlayerQuest[playerid][Title3] = title;
        PlayerQuest[playerid][Info3] = info;
        PlayerQuest[playerid][Reward3] = reward;
        PlayerQuest[playerid][Msg3] = msg;
        PlayerQuest[playerid][X3] = CPZ;
        PlayerQuest[playerid][Y3] = CPY;
        PlayerQuest[playerid][Z3] = CPZ;
        PlayerQuest[playerid][R3] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 3;
    }
    else if(PlayerQuest[playerid][Slot4] < 0)
    {
        PlayerQuest[playerid][Slot4] = questid;
        PlayerQuest[playerid][Title4] = title;
        PlayerQuest[playerid][Info4] = info;
        PlayerQuest[playerid][Reward4] = reward;
        PlayerQuest[playerid][Msg4] = msg;
        PlayerQuest[playerid][X4] = CPZ;
        PlayerQuest[playerid][Y4] = CPY;
        PlayerQuest[playerid][Z4] = CPZ;
        PlayerQuest[playerid][R4] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 4;
    }
    else if(PlayerQuest[playerid][Slot5] < 0)
    {
        PlayerQuest[playerid][Slot5] = questid;
        PlayerQuest[playerid][Title5] = title;
        PlayerQuest[playerid][Info5] = info;
        PlayerQuest[playerid][Reward5] = reward;
        PlayerQuest[playerid][Msg5] = msg;
        PlayerQuest[playerid][X5] = CPZ;
        PlayerQuest[playerid][Y5] = CPY;
        PlayerQuest[playerid][Z5] = CPZ;
        PlayerQuest[playerid][R5] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 5;
    }
    SendClientMessageFormatted(playerid, COLOR_WHITE,"QUEST: %s",msg);
    //Textdraw - info
    SetPlayerCheckpoint(playerid, CPX, CPY, CPZ, CPR);
    GameTextForPlayer(playerid, "~w~Quest Accepted", 4000, 0);
    return 1;
}
pawn Код:
if(dialogid == 5055)
    {
        if(response == 1)
        {
            SetQuest(playerid, 1, "Talk to the leader of Hilltop Fort.", "... I'll Scratch Yours", "Travel to Hilltop Fort, located in the hills north-west of Gate B2.\n\nTalk to the leader of the Fort and tell him Sergeant Wyatt sent you.\n\nMaybe he's got some work for you.", "- 50 XP\n- 2 Bandage\n1 Small Medkit", 1242.7507,-316.7700,9.4604, 5.0);
        }
    }
Fix it and you get an internetz.
Reply
#7

And what doesn't work?
Reply
#8

It creates errors like the both above

Also it is bad scripting style to do it like this.
Reply
#9

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
And what doesn't work?
Gonna try Mauzens, one sec.
Reply
#10

Seems like strcat worked. Thanks a lot.

I know it's not my thread, but what the hell is this? (Now that I got your attention)

pawn Код:
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\CSRP.pwn(1229) : warning 209: function "Streamer_OnPlayerEnterCP" should return a value
I doubt that I've changed anything in my plugin. (Incognito's)
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)