How to fix it?
#1

Quote:

YCMD:newhouse(playerid, params[], help)
{
#pragma unused help
if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "You must be RCON admin");
new
Float:Pos[3],string[64],id,name[48],price,level;
if(sscanf(params, "is[48]ii",id,name,price,level)) return SCM(playerid, COLOR_RED, "Usage:"COL_WHITE" /newhouse [ID] [Name] [Price] [Level]");
if(id >= MAX_HOUSE) return SCM(playerid, COLOR_RED, "EROR: "COL_WHITE"Try again. You are type wrong house id");
format(string, sizeof(string), House_File, id);
if(fexist(string)) return SCM(playerid, COLOR_RED, "House on that id already exist!");
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
CreateSaveHouse(name,id,price,level,id+1,Pos[0],Pos[1],Pos[2]);
SCM(playerid, -1, ""COL_YELLOW"You are make house.");
return 1;
}

warning
Quote:

D:\GTASAN~1\GAMEMO~1\HSDM.pwn(13776) : warning 219: local variable "Pos" shadows a variable at a preceding level

Reply
#2

this means you have made pos a global varible and oyu are calling it again just make this


this
pawn Код:
Float:Pos[3],string[64],id,name[48],price,level;
to this:
pawn Код:
new string[64],id,name[48],price,level;
Reply
#3

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
this means you have made pos a global varible and oyu are calling it again just make this


this
pawn Код:
Float:Pos[3],string[64],id,name[48],price,level;
to this:
pawn Код:
new string[64],id,name[48],price,level;
now error on GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]).
warning code D:\GTASAN~1\GAMEMO~1\HSDM.pwn(13780) : error 035: argument type mismatch (argument 2)

come on help me, please
Reply
#4

go to the otp of the script and add

pawn Код:
new Float:Pos[3];
and make sure its the only one in the gamemode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)