error 010: invalid function or declaration [REP+]
#1

This is the code
pawn Код:
if(pStats[playerid][pK6ht] >= 120)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~g~Pungil", 32));
    }
    else if(80 <= pStats[playerid][pK6ht] <= 80)
    {
        TextDrawSetString(txtK6ht[playerid],  FixGameText("~w~Kхht: ~n~~y~Tдis", 32));
    }
    else if(pStats[playerid][pK6ht] <= 30)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~r~Tьhi", 32));
    }
    TextDrawShowForPlayer(playerid, txtK6ht[playerid]);

    return 1;
}
And errors
pawn Код:
C:\Users\Paul\Desktop\Social Gaming\gamemodes\SocialGaming.pwn(4476) : error 010: invalid function or declaration
C:\Users\Paul\Desktop\Social Gaming\gamemodes\SocialGaming.pwn(4480) : error 010: invalid function or declaration
C:\Users\Paul\Desktop\Social Gaming\gamemodes\SocialGaming.pwn(4484) : error 010: invalid function or declaration
C:\Users\Paul\Desktop\Social Gaming\gamemodes\SocialGaming.pwn(4490) : error 010: invalid function or declaration
C:\Users\Paul\Desktop\Social Gaming\gamemodes\SocialGaming.pwn(45638) : warning 203: symbol is never used: "pStats"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Exactly as it says , function is invalid... But it could be a bracket ( { and } )

So try:

pawn Код:
if(pStats[playerid][pK6ht] >= 120)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~g~Pungil", 32));
    }
    else if(80 <= pStats[playerid][pK6ht] <= 80)
    {
        TextDrawSetString(txtK6ht[playerid],  FixGameText("~w~Kхht: ~n~~y~Tдis", 32));
    }
    else if(pStats[playerid][pK6ht] <= 30)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~r~Tьhi", 32));
    }
    TextDrawShowForPlayer(playerid, txtK6ht[playerid]);
    }
    return 1;
}
Reply
#3

Still same errors..
Reply
#4

pawn Код:
if(pStats[playerid][pK6ht] >= 120)
    {
     if (TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~g~Pungil", 32));
    }
    else if(80 <= pStats[playerid][pK6ht] <= 80)
    {
        TextDrawSetString(txtK6ht[playerid],  FixGameText("~w~Kхht: ~n~~y~Tдis", 32));
    }
    else if(pStats[playerid][pK6ht] <= 30)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~r~Tьhi", 32));
    }
    TextDrawShowForPlayer(playerid, txtK6ht[playerid]);

    return 1;
}
You forgot an if statement
Reply
#5

Realy, Still same errors.
Reply
#6

Do you have
pawn Код:
new pStats[playerid][MAX_PLAYERS];
In your script?
Reply
#7

pawn Код:
if(pStats[playerid][pK6ht] > 120)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~g~Pungil", 32));
    }
    else if(80 < pStats[playerid][pK6ht] < 80)
    {
        TextDrawSetString(txtK6ht[playerid],  FixGameText("~w~Kхht: ~n~~y~Tдis", 32));
    }
    else if(pStats[playerid][pK6ht] < 30)
    {
        TextDrawSetString(txtK6ht[playerid], FixGameText("~w~Kхht: ~n~~r~Tьhi", 32));
    }
    TextDrawShowForPlayer(playerid, txtK6ht[playerid]);

    return 1;
}
Reply
#8

I think this
pawn Код:
else if(80 <= pStats[playerid][pK6ht] <= 80)
should be
pawn Код:
else if(30 < pStats[playerid][pK6ht] <= 80)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)