annoying script
#1

simple i am getting a load of Bull shit Errors and i dont know how to fix em

Код:
CMD:CreateHouse(playerid, Params)
{
	if(IsPlayerAdmin(playerid))
	GetPlayerPos(playerid EnterPosX, EnterPosY, EnterPoZ);
	if (sscanf(params, "iI("#DEFAULT_HOUSE_INTERIOR")i", CostP, SellP, interior, Slots2)) return ERROR("Usage: /AddHouse [price] (interior="#DEFAULT_HOUSE_INTERIOR") [Slots]");
	if (price <= 0) return ERROR("Price given is not correct!");
	if ((id = CreateHouse(EnterPosX, EnterPosY, EnterPosZ, CostP, SellP, interior, Slots2)) == INVALID_HOUSE_ID) ERROR("House could not be created! House limit "#MAX_HOUSES" may have been reached");
	SendClientMessage(0xFF0000, "A House has been created);
	Streamer_Update(playerid);
	return 1;
}
Errors

Код:
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 001: expected token: ",", but found "-identifier-"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "EnterPosX"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : 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 undefined Symbols are bull shit they are defined at the top of the script in a enum
Reply
#2

There's alot of faultiness there.

pawn Код:
CMD:CreateHouse(playerid, params)
{
    if(IsPlayerAdmin(playerid))
    GetPlayerPos(playerid, EnterPosX, EnterPosY, EnterPoZ);
    if (sscanf(params, "iI("#DEFAULT_HOUSE_INTERIOR")i", CostP, SellP, interior, Slots2)) return ERROR("Usage: /AddHouse [price] (interior="#DEFAULT_HOUSE_INTERIOR") [Slots]");
    if (price <= 0) return ERROR("Price given is not correct!");
    if ((id = CreateHouse(EnterPosX, EnterPosY, EnterPosZ, CostP, SellP, interior, Slots2)) == INVALID_HOUSE_ID) ERROR("House could not be created! House limit "#MAX_HOUSES" may have been reached");
    SendClientMessage(0xFF0000, "A House has been created);
    Streamer_Update(playerid);
    return 1;
}
Corrected some of it.
Reply
#3

Re-fixed the post above -> you forgot quotes somewhere
pawn Код:
CMD:CreateHouse(playerid, params)
{
    if(IsPlayerAdmin(playerid))
    GetPlayerPos(playerid, EnterPosX, EnterPosY, EnterPoZ);
    if (sscanf(params, "iI("#DEFAULT_HOUSE_INTERIOR")i", CostP, SellP, interior, Slots2)) return ERROR("Usage: /AddHouse [price] (interior="#DEFAULT_HOUSE_INTERIOR") [Slots]");
    if (price <= 0) return ERROR("Price given is not correct!");
    if ((id = CreateHouse(EnterPosX, EnterPosY, EnterPosZ, CostP, SellP, interior, Slots2)) == INVALID_HOUSE_ID) ERROR("House could not be created! House limit "#MAX_HOUSES" may have been reached");
    SendClientMessage(0xFF0000, "A House has been created");
    Streamer_Update(playerid);
    return 1;
}
Reply
#4

Код:
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "EnterPosX"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(399) : error 017: undefined symbol "sscanf"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(399) : error 017: undefined symbol "ERROR"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(400) : error 017: undefined symbol "price"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(400) : error 017: undefined symbol "ERROR"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(401) : error 017: undefined symbol "id"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(401) : error 017: undefined symbol "EnterPosX"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(401) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(401) : fatal error 107: too many error messages on one line

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


9 Errors.
i define them:

Код:
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 003: declaration of a local variable must appear in a compound block
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : warning 221: label name "Float" shadows tag name
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "EnterPosX"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "interior"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : 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
#5

Quote:
Originally Posted by Zonoya
Посмотреть сообщение
Код:
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 003: declaration of a local variable must appear in a compound block
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : warning 221: label name "Float" shadows tag name
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "EnterPosX"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : error 017: undefined symbol "interior"
C:\DOCUME~1\Rhys\Desktop\SAMP03~2\FILTER~1\H_D~1.PWN(398) : fatal error 107: too many error messages on one line

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


4 Errors.
Did you tried to guy here above?

// You edited your post I see.
Reply
#6

i just edited and did got 9 errors then i defined and same 4 errors
Reply
#7

anyone^^?
Reply
#8

This isn't your code. Cause firstly, your using sscanf incorrectly. Your code looks like something in which you were either attempting to do but failed horribly, or stripped.
Reply
#9

Fixed ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)