Facing errors.. Loads of errors..
#1

Hi there. I'm a new scripter but I have a friend who scripts for me. We found these errors and had no clues about how to fix them.

We'll try to fix them one by one

Here's the first error:

Code:
C:\Documents and Settings\M\Desktop\sarp.pwn(3280) : error 017: undefined symbol "builing"
C:\Documents and Settings\M\Desktop\sarp.pwn(3280) : warning 215: expression has no effect
C:\Documents and Settings\M\Desktop\sarp.pwn(3280) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\M\Desktop\sarp.pwn(3280) : error 029: invalid expression, assumed zero
C:\Documents and Settings\M\Desktop\sarp.pwn(3280) : fatal error 107: too many error messages on one line

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


4 Errors.
3280 Line:

Code:
building[i] = CreateDynamic3DTextLabel(string, COLOR_DCHAT, BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]+0.75,40.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
Block having this code:

Code:
stock LoadBuildings()
{
    new FileName[128], string[128];
    for(new i = 0; i < MAX_BUILDINGS; i++)
    {
        format(FileName, sizeof(FileName), "Buildings/Building_%d.ini", i);
        if(dini_Exists(FileName))
        {
            BInfo[i][bName] = dini_Get( FileName, "Name" );
            BInfo[i][bPickupID] = dini_Int(FileName, "PickupID" );
            BInfo[i][bLocked] = dini_Int(FileName, "Locked" );
            BInfo[i][bVIP] = dini_Int(FileName, "VIP" );
            BInfo[i][bExteriorID] = dini_Int(FileName, "ExteriorID" );
            BInfo[i][bInteriorID] = dini_Int(FileName, "InteriorID" );
            BInfo[i][bVirWorld] = dini_Int(FileName, "VirtualWorld");
            BInfo[i][bInteriorX] = dini_Float(FileName, "InteriorX" );
            BInfo[i][bInteriorY] = dini_Float(FileName, "InteriorY" );
            BInfo[i][bInteriorZ] = dini_Float(FileName, "InteriorZ" );
            BInfo[i][bExteriorX] = dini_Float(FileName, "ExteriorX" );
            BInfo[i][bExteriorY] = dini_Float(FileName, "ExteriorY" );
            BInfo[i][bExteriorZ] = dini_Float(FileName, "ExteriorZ" );
            printf( "[bSystem] Building %d spawned.", i);
            SpawnedBuildings++;
           	BInfo[i][bPickupID] = CreateDynamicPickup(1239, 23, BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ], 0, -1, -1, 150.0 );
           	format(string, sizeof(string), "{FF9900}%s{F0CC00}\nID: %d", BInfo[i][bName],i);
			builing[i] = CreateDynamic3DTextLabel(string, COLOR_DCHAT, BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]+0.75,40.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
		}
	}
		return 1;
}
Any help is appreciated. Thanks.
Reply
#2

You copied this code from another script?
Reply
#3

Yea?

Yes he did

But it's public script
Reply
#4

Define "building" ontop of the script.
Reply
#5

Quote:
Originally Posted by TheNavigator
View Post
Yea?

Yes he did

But it's public script
I didn't mention stealing script or whatever. Problem is he didn't copy whole thing.
Reply
#6

Made #define building

Found this

Code:
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 029: invalid expression, assumed zero
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : warning 215: expression has no effect
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 029: invalid expression, assumed zero
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : fatal error 107: too many error messages on one line

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


4 Errors.
And what shall I add then?
Reply
#7

Actually try
pawn Code:
new building;
Reply
#8

Code:
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 028: invalid subscript (not an array or too many subscripts): "building"
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : warning 215: expression has no effect
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : error 029: invalid expression, assumed zero
C:\Documents and Settings\M\Desktop\sarp.pwn(3281) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#9

By the way, I copied the code from here

http://ul.to/s3t4etvf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)