little warning
#1

Hi, this is the warning:
Код:
C:\Users\Mitchell\Desktop\server\gamemodes\SumoGM.pwn(1604) : warning 219: local variable "string" shadows a variable at a preceding level
And here is the part with the problem:
pawn Код:
if(cars[playerid]>0){
    new string[128];//1604
    cars[playerid]--;
    format(string,sizeof(string),"It worked! You still have %i cars left!",cars[playerid]);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,string);}
Reply
#2

Remove

pawn Код:
new string[128];
It is already defined somewhere in your script.

OR

You can change the name of string.

pawn Код:
if(cars[playerid]>0){
    new string2[128];//1604
    cars[playerid]--;
    format(string2,sizeof(string2),"It worked! You still have %i cars left!",cars[playerid]);
    SendClientMessage(playerid,COLOR_LIGHTGREEN,string2);}
Reply
#3

thnx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)