4 warnings
#1

C:\Users\*****\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\mtrp-final.pwn(2853 : warning 217: loose indentation
C:\Users\*****\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\mtrp-final.pwn(28540) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\*****\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\mtrp-final.pwn(28541) : warning 217: loose indentation
C:\Users\*****\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\mtrp-final.pwn(28546) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 warnings.

Source:

if(strcmp(cmdtext,"/coords",true) == 0)
{
new string[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, string);
return 1;
Reply
#2

Local variable's name is the same as global one, change the name for one of them and all related things to them and indent your code.
Reply
#3

And for the other errors
http://forum.sa-mp.com/index.php?topic=61893.0
Reply
#4

your code:
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, string);
return 1;
You need:
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, string);
return 1;
you had an extra space in
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
Reply
#5

Quote:
Originally Posted by [KMA
America ]
your code:
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, string);
return 1;
You need:
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, string);
return 1;
you had an extra space in
pawn Код:
new string[128], Float:X, Float:Y, Float:Z;
Did not see the diffrence......
Can you underline them?
Reply
#6

Код:
    if(strcmp(cmdtext,"/coords",true) == 0)
 {
 new strlol[128], Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(strlol, sizeof(strlol), "Co-ordinates: %f, %f, %f", X, Y, Z);
SendClientMessage(playerid, 0xFF00FFFF, strlol);
return 1;
This is gonna fix one of the warnings.

For the others 3 search around for identation
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)