[Help] In the /roadblock command -
YegerMaster - 14.04.2009
Actually, i add this to my script...
Код:
if(strcmp(cmdtext, "/roadblock", true)==0)
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateObject(981, X, Y, Z, 0.0, 0.0, A);
SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Deployed");
return 1;
}
And this is the problem in "Pawn compiler"...
Код:
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1900) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1902) : warning 213: tag mismatch
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1902) : warning 213: tag mismatch
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1902) : warning 213: tag mismatch
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1904) : warning 217: loose indentation
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 203: symbol is never used: "Z"
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 203: symbol is never used: "Y"
C:\Documents and Settings\аййм\щемзп дтбегд\ъйчйд згщд\Top Secret!\pawno\ъйчйд згщд\crp.pwn(1899) : warning 203: symbol is never used: "X"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
What i need to do to fix that problem?
Thanks!
Re: [Help] In the /roadblock command -
Benjo - 14.04.2009
You are getting these errors because you have already defined X, Y and Z earlier in your script. Try this:
Код:
if(strcmp(cmdtext, "/roadblock", true)==0)
{
new Float:pX, Float:pY, Float:pZ, Float:pA;
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerFacingAngle(playerid, pA);
CreateObject(981, pX, pY, pZ, 0.0, 0.0, pA);
SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Deployed");
return 1;
}
X, Y and Z have been renamed to pX, pY and pZ. A has been changed to pA too just to match :P
Re: [Help] In the /roadblock command -
OmeRinG - 14.04.2009
The errors were caused because there were already global variables named X Y Z
Re: [Help] In the /roadblock command -
_PDDRIFTER_ - 15.04.2009
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(283) : error 010: invalid function or declaration
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(286) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(290) : error 010: invalid function or declaration
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(292) : warning 203: symbol is never used: "pA"
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(292) : warning 203: symbol is never used: "pX"
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(292) : warning 203: symbol is never used: "pY"
C:\Users\zaynab account\Desktop\server\gamemodes\derby.pwn(292) : warning 203: symbol is never used: "pZ"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
erros help
Re: [Help] In the /roadblock command -
Bodo4you - 07.05.2009
Then you din't copied this
Код:
if(strcmp(cmdtext, "/roadblock", true)==0)
{
new Float:pX, Float:pY, Float:pZ, Float:pA;
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerFacingAngle(playerid, pA);
CreateObject(981, pX, pY, pZ, 0.0, 0.0, pA);
SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Deployed");
return 1;
}
You just added p to your X Y and Z but only in one line or maybe u skipped one line by mistake