Argument type mismatch help. -
Kestro - 15.04.2013
pawn Код:
stock SaveHouse(i)
{
new FileName[128];
format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
if(!fexist(FileName))
{
ERROR Line959INI_SetTag(FileName, "house");
ERROR Line960INI_WriteString(FileName, "InteriorID", HouseVar[i][hInteriorID]);
ERROR Line961INI_WriteFloat(FileName, "InteriorX", HouseVar[i][hInteriorX]);
ERROR Line962INI_WriteFloat(FileName, "InteriorY", HouseVar[i][hInteriorY]);
ERROR Line963INI_WriteFloat(FileName, "InteriorZ", HouseVar[i][hInteriorZ]);
ERROR Line964INI_WriteInt(FileName, "HousePrice", 0);
ERROR Line965INI_WriteInt(FileName, "ExteriorID", 0);
ERROR Line966INI_WriteFloat(FileName, "ExteriorX", HouseVar[i][hExteriorX]);
ERROR Line967INI_WriteFloat(FileName, "ExteriorY", HouseVar[i][hExteriorY]);
ERROR Line968INI_WriteFloat(FileName, "ExteriorZ", HouseVar[i][hExteriorZ]);
ERROR Line969INI_WriteString(FileName, "Owner", "Nobody");
ERROR Line970INI_WriteInt(FileName, "LockStatus", HouseVar[i][LockStatus]);
ERROR Line971INI_Close(FileName);
printf("[system] House %d saved.", i);
}
return 1;
}
That's the code, and here are the errors.
pawn Код:
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(959) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(960) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(961) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(962) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(963) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(964) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(965) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(966) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(967) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(968) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(969) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(970) : error 035: argument type mismatch (argument 1)
C:\Users\Aidan\Desktop\Gamemode from scratch\gamemodes\RP.pwn(971) : error 035: argument type mismatch (argument 1)
13 errors.
And all those errors are on my stock, please help, thanks
Re: Argument type mismatch help. -
newbienoob - 15.04.2013
"InteriorID" is a string?
Re: Argument type mismatch help. -
Kestro - 15.04.2013
Quote:
Originally Posted by newbienoob
"InteriorID" is a string?
|
Yes it is
Re: Argument type mismatch help. -
newbienoob - 15.04.2013
show me your enum
Re: Argument type mismatch help. -
Isolated - 15.04.2013
I'm not sure if that's the correct syntax.
Re: Argument type mismatch help. -
Om3n - 15.04.2013
he want to see enum of HouseVar.
Re: Argument type mismatch help. -
KingHual - 15.04.2013
Код:
new FileName[128];
format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
new INI:handle = INI_Open(FileName);
if(!fexist(handle))
{
ERROR Line959INI_SetTag(handle , "house");
ERROR Line960INI_WriteString(handle , "InteriorID", HouseVar[i][hInteriorID]);
ERROR Line961INI_WriteFloat(handle , "InteriorX", HouseVar[i][hInteriorX]);
ERROR Line962INI_WriteFloat(handle , "InteriorY", HouseVar[i][hInteriorY]);
ERROR Line963INI_WriteFloat(handle , "InteriorZ", HouseVar[i][hInteriorZ]);
ERROR Line964INI_WriteInt(handle , "HousePrice", 0);
ERROR Line965INI_WriteInt(handle , "ExteriorID", 0);
ERROR Line966INI_WriteFloat(handle , "ExteriorX", HouseVar[i][hExteriorX]);
ERROR Line967INI_WriteFloat(handle , "ExteriorY", HouseVar[i][hExteriorY]);
ERROR Line968INI_WriteFloat(handle , "ExteriorZ", HouseVar[i][hExteriorZ]);
ERROR Line969INI_WriteString(handle , "Owner", "Nobody");
ERROR Line970INI_WriteInt(handle , "LockStatus", HouseVar[i][LockStatus]);
ERROR Line971INI_Close(handle);
printf("[system] House %d saved.", i);
}
Re: Argument type mismatch help. -
Kestro - 15.04.2013
Thanks, I have one error left now which is:
pawn Код:
error 035: argument type mismatch (argument 1)
CODE:
Re: Argument type mismatch help. -
KingHual - 15.04.2013
Yeah, my bad, replace it with
Код:
if(!fexist(FileName))
AW: Argument type mismatch help. -
Kwashiorkor - 15.04.2013
edit king_hual's code
[pwn]format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
if(!fexist(FileName))
{
new INI:handle = INI_Open(FileName);[/pwn]