Problem interior -
KamilPolska - 29.03.2020
I have a problem with interiors. In the database, each house has the interior set with ID 1 and when I enter, for example, house ID 0, I can enter the interior, but when I enter another house ID 1, there is no interior and I start to fall off the map. Why?
https://pastebin.com/LbqFN3HQ
Re: Problem interior -
MichiCZ - 29.03.2020
You have not defined interiors positions... Every interior have their on "Spawn point". Example:
Interior: Jefferson motel
ID:15
X,Y,Z: 2215.454833,-1147.475585,1025.796875
Re: Problem interior -
KamilPolska - 29.03.2020
Yes, but there are two interiors added to the database .
Re: Problem interior -
MichiCZ - 29.03.2020
Are you sure you loaded coordinates correctly?
Code:
IntInfo[houseinterior][IntPosX]
IntInfo[houseinterior][IntPosY]
IntInfo[houseinterior][IntPosZ]
Re: Problem interior -
KamilPolska - 29.03.2020
I think so. In the database I have 2 interiors added and when I enter the house with ID 0 and 1 I enter the interior is good but when I go to the house with ID 2 I fall from the map I do not know why this is happening.
Houses:
Interiors:
Re: Problem interior -
MichiCZ - 29.03.2020
You must store and load coordinates as float, if u putted it manually, use . no ,
and make sure if your columns are set for storing float
Re: Problem interior -
SiaReyes - 29.03.2020
Check the interior co-ordinates of int_4 are right.
Re: Problem interior -
KamilPolska - 29.03.2020
I saved the positions and still the same. I entered the house with ID 0 and it was interior 6 and the database is set to interior 4 ...
Edit: Still different happens when I remove "new houseinterior = DomInfo [HouseID] [dInterior];" and HouseID adds, when I enter the house with ID 0 it is interior 1 and the house ID 1 is interior 4 and house ID 2 has interior 6 so I don't know what is going on and how to fix it .. And house ID 3 has no interior because I'm falling off the map.
Re: Problem interior -
Symon - 29.03.2020
Excuse me, an off topic question. Which MySQL database viewer are you using? Isn't phpMyAdmin?
Re: Problem interior -
JasonRiggs - 29.03.2020
I don't know whether I understand your problem or not, but I believe if it's that the last house in the database doesn't have an interior it's about the loop you're making to load the data from sql you did like that..
PHP Code:
for(new i = 0; i < rows; i++)
Which means that the last row shall not be loaded as far as I believe try to make it like..
PHP Code:
for(new i = 0; i < rows+1; i++)