[Help]Some Errors :D
#1

Hello DDD
i have problems after i made fuel speedo and .....
Quote:

C:\D\pawno\include\foreach.inc(963) : warning 219: local variable "s1" shadows a variable at a preceding level
C:\D\gamemodes\willsee.pwn(811) : warning 219: local variable "s1" shadows a variable at a preceding level
C:\D\gamemodes\willsee.pwn(812) : warning 219: local variable "s2" shadows a variable at a preceding level
C:\D\gamemodes\willsee.pwn(722 : error 021: symbol already defined: "TextdrawString"
C:\D\gamemodes\willsee.pwn(7229) : error 021: symbol already defined: "model"

line 963
PHP код:

Line 811
PHP код:
    new s1 1
Line 812
PHP код:
    new s2 0
line 7228
PHP код:
    new TextdrawString[32]; 
line 7229
PHP код:
    new model GetVehicleModel(GetPlayerVehicleID(playerid)); 
help +reps
Reply
#2

Please show more of the codes.
But this
pawn Код:
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
Might already be in the script, should remove the error if you just delete it.
Reply
#3

3 error now
Quote:

D:\ss\pawno\include\foreach.inc(963) : warning 219: local variable "s1" shadows a variable at a preceding level
D:\ss\gamemodes\willsee.pwn(811) : warning 219: local variable "s1" shadows a variable at a preceding level
D:\ss\gamemodes\willsee.pwn(812) : warning 219: local variable "s2" shadows a variable at a preceding level

line 963
Quote:

}

811 and 812
Quote:

new s1 = 1;
new s2 = 0;

Reply
#4

CalvinC
where u?
help please
Reply
#5

Replace s1 and s2 because they have been already declared as global variables, maybe try 'S1' instead of 's1', 'S2' instead of 's2'
Reply
#6

its here

Quote:

stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}

and here
Quote:

GetVehicleVelocity(GetPlayerVehicleID(playerid), svx[playerid], svy[playerid], svz[playerid]); // This Saves Our Velocitys To Our Varibles
s1[playerid] = floatsqroot(((svx[playerid]*svx[playerid])+(svy[playerid]*svy[playerid]))+(svz[playerid]*svz[playerid]))*100; // This Is Our Forumula ( I Don't Know How It Works but i found it on internet )
s2[playerid] = floatround(s1[playerid],floatround_round); // Round the output off to a whole number
format(s3[playerid],32,"%i", s2[playerid]); // The textdraw string
TextDrawSetString(MPH1[playerid], s3[playerid]); // The actual changing of the textdraw

Reply
#7

Do you have
pawn Код:
new s1
Any other place? You can use CTRL+H and search.
If so, delete one of them, same with s2.
Reply
#8

Quote:

C:\D\pawno\include\foreach.inc(963) : warning 219: local variable "s1" shadows a variable at a preceding level
C:\D\gamemodes\willsee.pwn(811) : warning 219: local variable "s1" shadows a variable at a preceding level
C:\D\gamemodes\willsee.pwn(812) : warning 219: local variable "s2" shadows a variable at a preceding level

This just means that you have defined something twice. It would be like writing this:

Quote:

CMD:timer(playerid, params[])
{
new timer;
SetTimerEx(bla bla bla);
new timer;
}

Above, you are defining timer twice ( new timer; )

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)