SA-MP Forums Archive
House Bug - 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)
+--- Thread: House Bug (/showthread.php?tid=585418)



House Bug - Jigsaw123 - 13.08.2015

Hey guys.. Hopefully you guys can help me solve this:

Error I get:
Код:
C:\Users\Gabriel Vasvari\Desktop\Blueberry Roleplay\Script\gamemodes\roleplay.pwn(532) : error 017: undefined symbol "HouseLabel"
C:\Users\Gabriel Vasvari\Desktop\Blueberry Roleplay\Script\gamemodes\roleplay.pwn(532) : warning 215: expression has no effect
C:\Users\Gabriel Vasvari\Desktop\Blueberry Roleplay\Script\gamemodes\roleplay.pwn(532) : error 001: expected token: ";", but found "]"
C:\Users\Gabriel Vasvari\Desktop\Blueberry Roleplay\Script\gamemodes\roleplay.pwn(532) : error 029: invalid expression, assumed zero
C:\Users\Gabriel Vasvari\Desktop\Blueberry Roleplay\Script\gamemodes\roleplay.pwn(532) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
The Lines, Starting with line 532 Onwards:
Код:
			HouseLabel[h] = CreateDynamic3DTextLabel(labeltext, COLOUR_GREEN, hInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ]+0.7, TEXTLABEL_DISTANCE, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, TEXTLABEL_TESTLOS, hInfo[h][SpawnWorld], hInfo[h][SpawnInterior], -1, TEXTLABEL_DISTANCE);
            if(isnull(hIntInfo[hInfo[h][HouseInterior]][IntName]))
			{
			    hInfo[h][HouseInterior] = DEFAULT_H_INTERIOR;
			    file = INI_Open(HouseFile(h));
			    INI_WriteInt(file, "HouseInterior", DEFAULT_H_INTERIOR);
			    INI_Close(file);
			}
			Iter_Add(Houses, h);
		    hcount++;
		}
	}
Thank you!


Re: House Bug - bensmart469 - 13.08.2015

It says it in the errors. You didn't define "HouseLabel". It might look something like:
pawn Код:
new HouseLabel[MAX_HOUSES];



Respuesta: House Bug - Whyd - 13.08.2015

You need define HouseLabel new Text3D:HouseLabel[500];

replace 500 for your ammount houses


Re: House Bug - Jigsaw123 - 13.08.2015

Код:
new Iterator:Houses<MAX_HOUSES>, Text3D:HouseLabel[MAX_HOUSES], Float:X, Float:Y, Float:Z, Float:Angle;



Re: House Bug - Jigsaw123 - 13.08.2015

hydewhyd - Still doesn't work when I replaces MAX_HOUSES with 500 :[


Re: House Bug - LovelySoomro - 13.08.2015

new HouseLabel[500];

try this on top of the script


Re: House Bug - jlalt - 13.08.2015

you sure you add it like that?
PHP код:
            new Text3D:HouseLabel[500];
            
HouseLabel[h] = CreateDynamic3DTextLabel(labeltextCOLOUR_GREENhInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ]+0.7TEXTLABEL_DISTANCEINVALID_PLAYER_IDINVALID_VEHICLE_IDTEXTLABEL_TESTLOShInfo[h][SpawnWorld], hInfo[h][SpawnInterior], -1TEXTLABEL_DISTANCE);
            if(
isnull(hIntInfo[hInfo[h][HouseInterior]][IntName]))
            {
                
hInfo[h][HouseInterior] = DEFAULT_H_INTERIOR;
                
file INI_Open(HouseFile(h));
                
INI_WriteInt(file"HouseInterior"DEFAULT_H_INTERIOR);
                
INI_Close(file);
            }
            
Iter_Add(Housesh);
            
hcount++;
        }
    } 
NOTE:
Код:
new Text3D:HouseLabel[500];
has copyed from our friend lol [ hydewhyd ]


Respuesta: House Bug - Whyd - 15.08.2015

new Text3D:HouseLabel[MAX_HOUSES];

on the top of your script (news, enums)....