Error Help me please!
#1

how to fix this error ?

pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(6828) : error 028: invalid subscript (not an array or too many subscripts): "exp"
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(6828) : warning 215: expression has no effect
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(6828) : error 001: expected token: ";", but found "]"
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(6828) : error 029: invalid expression, assumed zero
F:\Users\Daniel\Desktop\GamingClub RP\gamemodes\DreamWorld.pwn(6828) : fatal error 107: too many error messages on one line
Line:


pawn Код:
new expstring[128];
        new nxtlevel = PlayerInfo[playerid][pLevel]+1;
        new expamount = nxtlevel*levelexp;
        format(expstring, sizeof(expstring), "%d / %d",PlayerInfo[playerid][pExp],expamount);
        TextDrawSetString(exp[playerid], expstring); // line
        TextDrawShowForPlayer(playerid, exp[playerid]);
Reply
#2

What is exp
Reply
#3

EXP is the name of my textdraw with that the textdraw need to be on server (ingame) but i have errors :S
Reply
#4

How is the "exp" array created?

It should be something like this:
pawn Код:
new Text:exp[MAX_PLAYERS];
Also, you unnecessarily create a new variable:
pawn Код:
new expamount = nxtlevel*levelexp;
format(expstring, sizeof(expstring), "%d / %d",PlayerInfo[playerid][pExp],expamount);
This can be replaced by:
pawn Код:
format(expstring, sizeof(expstring), "%d / %d", PlayerInfo[playerid][pExp], (nxtlevel * levelexp));
Reply
#5

Same :S i have new Text:Exp.....

here is the textdraw

pawn Код:
exp[playerid] = TextDrawCreate(500.000000, 100.000000, "_");
    TextDrawBackgroundColor(exp[playerid], 255);
    TextDrawFont(exp[playerid], 2);
    TextDrawLetterSize(exp[playerid], 0.500000, 1.000000);
    TextDrawColor(exp[playerid], -1);
    TextDrawSetOutline(exp[playerid], 0);
    TextDrawColor(exp[playerid],COLOR_RED);
    TextDrawSetProportional(exp[playerid], 1);
    TextDrawSetShadow(exp[playerid], 1);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)