21.12.2013, 17:04
Hello there i need help with my gamemod im putting in a property system buy it seems to be giving me an error and warnings i would be gratefull if you showed me how to solve them ?!
The error and the warnings:
Here is the pawn code from line 7139 to 7152:
I don't know how to solve these please help!
The error and the warnings:
Код:
E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7142) : warning 219: local variable "Distance" shadows a variable at a preceding level E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7145) : error 022: must be lvalue (non-constant) E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7146) : warning 213: tag mismatch E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7146) : warning 206: redundant test: constant expression is non-zero E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7142) : warning 203: symbol is never used: "Distance" E:\SAMP\SAMP\VirtualWorld RPG Macedonia v1.0\gamemodes\VIRTUALWORLD.pwn(7232) : warning 219: local variable "CP" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
PHP код:
7139: forward IsPlayerNearProperty(playerid);
7140: public IsPlayerNearProperty(playerid)
7141: {
7142: new Float:Distance;
7143: for(new prop; prop<PropertiesAmount; prop++)
7144: {
7145: Distance = GetDistanceToProperty(playerid, prop);
7146: if(Distance < 1.0)
7147: {
7148: return prop;
7149: }
7150: }
7151: return -1;
7152: }