I need a scripter to look at these errors:
#1

Hello,

When I compile my script it gives these errors:


C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(561) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(576) : warning 201: redefinition of constant/macro (symbol "COLOR_BLUE")
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(3494) : warning 235: public function lacks forward declaration (symbol "Audio_OnSetPack")
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(17303) : error 044: positional parameters must precede all named parameters
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(17303) : warning 215: expression has no effect
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(17303) : error 001: expected token: ";", but found ")"
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(17303) : error 029: invalid expression, assumed zero
C:\Users\Arjan\Desktop\Name Roleplay\gamemodes\EA-RP.pwn(17303) : fatal error 107: too many error messages on one line

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


4 Errors.

I don't know anymore what to do.

Here is the code of line 17303 (from 17250 until 17309) :


Код:
LoadHouses() {

	if(!fexist("apartments.cfg")) return 1;

	new
		szFileStr[1024],
		File: iFileHandle = fopen("apartments.cfg", io_read),
		iIndex;

	while(iIndex < sizeof(HouseInfo) && fread(iFileHandle, szFileStr)) {
		sscanf(szFileStr, "p<|>iiis[128]s[24]ffffffffiiiiiiiiiiiiiiiiiff",
			HouseInfo[iIndex][hOwned],
			HouseInfo[iIndex][hLevel],
			HouseInfo[iIndex][hHInteriorWorld],
			HouseInfo[iIndex][hDescription],
			HouseInfo[iIndex][hOwner],
			HouseInfo[iIndex][hExteriorX],
			HouseInfo[iIndex][hExteriorY],
			HouseInfo[iIndex][hExteriorZ],
			HouseInfo[iIndex][hExteriorR],
			HouseInfo[iIndex][hInteriorX],
			HouseInfo[iIndex][hInteriorY],
			HouseInfo[iIndex][hInteriorZ],
			HouseInfo[iIndex][hInteriorR],
			HouseInfo[iIndex][hLock],
			HouseInfo[iIndex][hRentable],
			HouseInfo[iIndex][hRentFee],
			HouseInfo[iIndex][hValue],
			HouseInfo[iIndex][hSafeMoney],
			HouseInfo[iIndex][hPot],
			HouseInfo[iIndex][hCrack],
			HouseInfo[iIndex][hMaterials],
			HouseInfo[iIndex][hWeapons][0],
			HouseInfo[iIndex][hWeapons][1],
			HouseInfo[iIndex][hWeapons][2],
			HouseInfo[iIndex][hWeapons][3],
			HouseInfo[iIndex][hWeapons][4],
			HouseInfo[iIndex][hGLUpgrade],
			HouseInfo[iIndex][hPickupID],
			HouseInfo[iIndex][hCustomInterior],
			HouseInfo[iIndex][hCustomExterior],
			HouseInfo[iIndex][hExteriorA],
			HouseInfo[iIndex][hInteriorA]
		);

		if(HouseInfo[iIndex][hOwned]) {
			if(HouseInfo[iIndex][hRentable] == 0) format(szFileStr, sizeof(szFileStr), "This house is owned by\n%s\nLevel: %d\nID: %d",HouseInfo[iIndex][hOwner],HouseInfo[iIndex][hLevel],iIndex);
			else format(szFileStr, sizeof(szFileStr), "This house is owned by\n%s\nRent: $%d\nLevel: %d\nID: %d\nType /rentroom to rent a room",HouseInfo[iIndex][hOwner],HouseInfo[iIndex][hRentFee],HouseInfo[iIndex][hLevel],iIndex);
		}
		else format(szFileStr, sizeof(szFileStr), "This house is\n for sale!\n House Type: %s\nCost: $%d\n Level: %d\nID: %d\nTo buy this house type /buyhouse",HouseInfo[iIndex][hDescription],HouseInfo[iIndex][hValue],HouseInfo[iIndex][hLevel],iIndex);

		if(HouseInfo[iIndex][hExteriorX] != 0.0) {
			HouseInfo[iIndex][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]);
			HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, 
This line (17303):      HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos = 1, streamdistance = 30.0)
		}
		++iIndex;
	}
	return fclose(iFileHandle);
}
If you help me I'll give you reputation
Reply
#2

pawn Код:
CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, 1, 30.0);
Reply
#3

Quote:

warning 201: redefinition of constant/macro (symbol "COLOR_RED")
warning 201: redefinition of constant/macro (symbol "COLOR_BLUE")

This warnings means you've defined twice COLOR_RED and COLOR_BLUE.Remove the copy for COLOR_RED and COLOR_BLUE.

Quote:

warning 235: public function lacks forward declaration (symbol "Audio_OnSetPack")

You forgot to forward:

pawn Код:
forward Audio_OnSetPack(audiopack[]);
Reply
#4

Quoted straight from one of the many NGRP developers.
Quote:
Originally Posted by GhoulSlayeR
Honestly I don't care if you open the script up and take a peak to learn something from it, but Jesus don't go doing a mass-replace, re-compiling it and casting it as your own - that's just unmoral.
Stop using the NGRP script.
Reply
#5

NGRP script..

the reason it has errors to stop people leaking it out..

Just dovelope ravens or something.. NGRP would be to advanced.
Reply
#6

Use some other script i suggest.
Reply
#7

As far as I know this isn't NG script. A friend of mine gave it to me. But whatever.

Where do I need to put this line?

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
pawn Код:
CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, 1, 30.0);
I don't get it.
Reply
#8

Under OnGameModeInIt callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)