SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/02/2018, 02:32 AM   #1
Macca123
Little Clucker
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default Housing Problem.

Hi all!

The problem is that i owned two houses and it shows only 1 with wrng id and wrng No .

Example take my 2 houses ID:341 (1 house) and ID:342 (2nd house)

in the menu it shows

NO ID Name Location
2 342 MYHouseName Ganton

so the id and NO are showing the my 2nd house but not the 1st house.

here is my code
https://pastebin.com/hzpUXK9t

Original Code
https://pastebin.com/M3Vfk6mC

Picture of my dialog
http://image.ibb.co/fsKSD7/sa_mp_525.png
Macca123 is offline   Reply With Quote
Old 15/02/2018, 02:35 AM   #2
Mugala
Gangsta
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: behind u
Posts: 526
Reputation: 23
Default Re: Housing Problem.

you're using same houses as 2 houses? try with different house ID
__________________
here to help
Mugala is offline   Reply With Quote
Old 15/02/2018, 02:38 AM   #3
Macca123
Little Clucker
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default Re: Housing Problem.

Check post again sorry.
Macca123 is offline   Reply With Quote
Old 15/02/2018, 02:43 AM   #4
Mugala
Gangsta
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: behind u
Posts: 526
Reputation: 23
Default Re: Housing Problem.

okay looks like you edited it, can u show me this Loop function?
and are you sure it's working?
__________________
here to help
Mugala is offline   Reply With Quote
Old 15/02/2018, 02:44 AM   #5
Macca123
Little Clucker
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default Re: Housing Problem.

#define Loop(%0,%1,%2) for(new %0 = %2; %0 < %1; %0++)
Macca123 is offline   Reply With Quote
Old 15/02/2018, 02:49 AM   #6
Mugala
Gangsta
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: behind u
Posts: 526
Reputation: 23
Default Re: Housing Problem.

try this: Loop(itt, max house number here, 0)
__________________
here to help
Mugala is offline   Reply With Quote
Old 15/02/2018, 02:55 AM   #7
Macca123
Little Clucker
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default Re: Housing Problem.

Ill try this thanks.
Macca123 is offline   Reply With Quote
Old 15/02/2018, 03:04 AM   #8
Macca123
Little Clucker
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default Re: Housing Problem.

See here.
Attached Images
File Type: jpg Screenshot_20180215-025750.jpg (154.8 KB, 5 views)
Macca123 is offline   Reply With Quote
Old 15/02/2018, 03:14 AM   #9
Mugala
Gangsta
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: behind u
Posts: 526
Reputation: 23
Default Re: Housing Problem.

okay undo this code and output with printf whole loop.

PHP Code:
        printf("[LOOPED] House ID %d looped",itt);
        if(
itt == count)
        {
            
format(list, sizeof(list), "%s%d\t\%d\t%s\t%s\n", list, itthhInfo[h][HouseName], hInfo[h][HouseLocation]);
            
printf("[LOOPED] House ID %d found",h);
        } 
also please provide these codes
ReturnPlayerHouseID
GetOwnedHouses

and does this code (original as u titled) https://pastebin.com/M3Vfk6mC worked before?
__________________
here to help
Mugala is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PPC Housing Hunud Everything and Nothing 5 27/06/2017 05:11 PM
PPC housing problem sirvanec Scripting Help 3 18/07/2015 01:51 PM
About housing. Vvolk Help Archive 3 29/05/2011 06:00 PM
Housing Mysql System Problem Kyle Help Archive 0 12/11/2010 12:06 PM
SZR:GTA Roleplay housing / Dynamic Housing [Request] Oi! Help Archive 2 08/07/2009 10:13 AM


All times are GMT. The time now is 11:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.