IMMEDIATE Help
#1

Been working on a little faction system that I read from a tutorial, and I keep getting some errors and I need help because my brain is throbbing.

pawn Код:
practisePRACTISEALL.pwn(203) : warning 202: number of arguments does not match definition
practisePRACTISEALL.pwn(203) : error 017: undefined symbol "bExtra"
practisePRACTISEALL.pwn(210) : error 028: invalid subscript (not an array or too many subscripts): "fInfo"
practisePRACTISEALL.pwn(210) : warning 215: expression has no effect
practisePRACTISEALL.pwn(210) : error 001: expected token: ";", but found "]"
practisePRACTISEALL.pwn(210) : error 029: invalid expression, assumed zero
practisePRACTISEALL.pwn(210) : fatal error 107: too many error messages on one line
And now these are lines 203 & 210

203 -

pawn Код:
INI_ParseFile(FactionPath(playerid, "LoadFaction_%s", .bExtra = true, .extra = playerid);
210 -

pawn Код:
fInfo[playerid][fFactionID] = 0;
Thanks
Reply
#2

Try to close your parentheses, you opened two pairs but closed one.

Can I see where you defined your fInfo and fFactionID.

And can I see whatever is above fInfo[playerid][fFactionID] please?

(to fix your 203 problems, this may work)
pawn Код:
INI_ParseFile(FactionPath(playerid), "LoadFaction_%s", .bExtra = true, .extra = playerid);
Reply
#3

203 problem was fixed by me earlier, I forgot to close them lol.

Here's what's above.

pawn Код:
INI_WriteInt(File,"FactionID",0);

fInfo & fFactionID defined

pawn Код:
enum fInfo
{
    fFactionID,
    fLeader,
    fRank,
};
new FactionInfo[MAX_PLAYERS][fInfo];
Reply
#4

pawn Код:
FactionInfo[playerid][fFactionID] = 0;
Reply
#5

SilverKiller, it'd help if you told me what to do with that piece of code.
Reply
#6

It's obvious, replace it with the other one.

pawn Код:
//Change this
fInfo[playerid][fFactionID] = 0;

//To this
FactionInfo[playerid][fFactionID] = 0;
Reply
#7

Done that.

These errors come up.

pawn Код:
practisePRACTISEALL.pwn(213) : error 029: invalid expression, assumed zero
practisePRACTISEALL.pwn(213) : warning 215: expression has no effect
practisePRACTISEALL.pwn(213) : error 001: expected token: ";", but found "]"
practisePRACTISEALL.pwn(213) : error 029: invalid expression, assumed zero
practisePRACTISEALL.pwn(213) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
This is line 213 and the one above.
pawn Код:
FactionInfo[playerid][fRank] = 0; //One above
        FactionName[playerid] = "Civillian"; //213
These are probably school boy errors, but I'm tired, been up all night trying to figure shit that I don't understand out, and I'm just getting pissed off. Don't know why I'm bothering, but I don't want to give up.
Reply
#8

Not quite sure, but I don't think you can do it like that.

First off, can you show me the FactionName variable (where it is defined)?

I assume it's something like this:
pawn Код:
new FactionName[MAX_PLAYERS][MAX_PLAYER_NAME]; //MAX PLAYER NAME can be any number, just example.
If so, I believe you cannot edit a string like that. Format it.

pawn Код:
format(FactionName[playerid], 24, "Civilian");
Or something like that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)