Problem with dini_Get - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with dini_Get (
/showthread.php?tid=158283)
Problem with dini_Get -
Maxips2 - 09.07.2010
This is the line:
pawn Code:
HouseInfo[houseid][hOwner] = dini_Get(file, "Owner");
This is the error:
pawn Code:
error 006: must be assigned to an array
Re: Problem with dini_Get -
Grim_ - 09.07.2010
pawn Code:
new owner[20];
owner = dini_Get(file, "Owner");
strmid(HouseInfo[houseid][hOwner], owner, 0, sizeof(owner));
Try that.
Re: Problem with dini_Get -
Jeffry - 09.07.2010
Can you show your "enum" ? This where you define the variable HouseInfo.
Re: Problem with dini_Get -
Maxips2 - 09.07.2010
pawn Code:
array sizes do not match, or destination array is too small
This line:
pawn Code:
owner = dini_Get(file, "Owner");
pawn Code:
enum hInfo
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hInterior,
hVirtualWorld,
hPickup,
hOwned,
hOwner,
Text3D:hLabel,
hPrice,
hDescription,
hExist
}
Re: Problem with dini_Get -
CAR - 09.07.2010
format(HouseInfo[houseid][hOwner],MAX_PLAYER_NAME, "%s",dini_Get(file, "Owner"));
Re: Problem with dini_Get -
Maxips2 - 09.07.2010
CAR, you rock, once again, thanks
Re: Problem with dini_Get -
CAR - 09.07.2010
No problem
Re: Problem with dini_Get -
Jeffry - 09.07.2010
pawn Code:
enum hInfo
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hInterior,
hVirtualWorld,
hPickup,
hOwned,
hOwner[MAX_PLAYER_NAME], // <====
Text3D:hLabel,
hPrice,
hDescription,
hExist
}
I think this would have worked too, or am I wrong?