SA-MP Forums Archive
HELp PLEASEE I NEED IT !!! REPP + ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELp PLEASEE I NEED IT !!! REPP + ! (/showthread.php?tid=367819)



HELp PLEASEE I NEED IT !!! REPP + ! - Vizi - 11.08.2012

Hi!!
I have this error look

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

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



Re: HELp PLEASEE I NEED IT !!! REPP + ! - phillip875 - 11.08.2012

Change new string[128] to this:

pawn Код:
new Text:string[128];



Re: HELp PLEASEE I NEED IT !!! REPP + ! - Vizi - 11.08.2012

Ohhh Same :S
PLease helppppppp !REPP ++++++++


AW: HELp PLEASEE I NEED IT !!! REPP + ! - Tigerkiller - 11.08.2012

make sure you have defined exp Global for all Players

pawn Код:
new exp[MAX_PLAYERS];
// for TextDraw
new Text:exp[MAX_PLAYERS];



Re: HELp PLEASEE I NEED IT !!! REPP + ! - Vizi - 11.08.2012

I have defined :S


AW: HELp PLEASEE I NEED IT !!! REPP + ! - Tigerkiller - 11.08.2012

How you created the TextDraws for all players ?
I dont see in your code any errors


Re: HELp PLEASEE I NEED IT !!! REPP + ! - Vizi - 11.08.2012

the 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);
and i have
pawn Код:
new Text:exp[MAX_PLAYERS];



AW: HELp PLEASEE I NEED IT !!! REPP + ! - Tigerkiller - 11.08.2012

Try this:
pawn Код:
new Text:exp[MAX_PLAYERS][25]; // Not sure



Re: HELp PLEASEE I NEED IT !!! REPP + ! - Vizi - 11.08.2012

No :S
Bro this textdraw for exp system i have take from another gamemode.But i take all the things :S
Sorry for bad english


AW: HELp PLEASEE I NEED IT !!! REPP + ! - Tigerkiller - 11.08.2012

Hmm sure you showd us ur correct lines ?
if so then i dont got any ideas, sorry

// EDIT:
pawn Код:
PlayerInfo[playerid][pExp]
is defined ?