Help solving some errors
#1

Hey guys i ran into a couple errors i wasnt able to fix, Think you guys could help out?

Errors:
Код:
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 028: invalid subscript (not an array or too many subscripts): "CP"
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : warning 215: expression has no effect
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 001: expected token: ";", but found "]"
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 029: invalid expression, assumed zero
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 10217:
Код:
	CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1; PlayerInfo[playerid][pPot] = 0;
Need to solve this ASAP, Thanks!
Reply
#2

Show more lines above and under line 10217 and we'll be able to help.
Reply
#3

As far as I have seen in pawn, you cannot do more than one ; (semi-colon) per line. Add them to separated lines or put "," between them and add only ; to the end.

Not 100% sure.
Reply
#4

Quote:
Originally Posted by TheOriginal1337
Посмотреть сообщение
Show more lines above and under line 10217 and we'll be able to help.
Код:
	PlayerInfo[playerid][pGangWarn] = 0; CurrentMoney[playerid] = 0; UsedFind[playerid] = 0; PlayerInfo[playerid][pTriageTime] = 0;
	PlayerInfo[playerid][pCigar] = 0; PlayerInfo[playerid][pSprunk] = 0; PlayerInfo[playerid][pSpraycan] = 0;
	CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1; PlayerInfo[playerid][pPot] = 0;
	RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0; PlayerInfo[playerid][pCrack] = 0;
	STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0; PlayerInfo[playerid][pC4] = 0; PlayerInfo[playerid][pAdmin] = 0;
	RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0; PlayerInfo[playerid][pHelper] = 0;
	TalkingLive[playerid] = INVALID_PLAYER_ID; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
Those are some lines around them


Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
As far as I have seen in pawn, you cannot do more than one ; (semi-colon) per line. Add them to separated lines or put "," between them and add only ; to the end.

Not 100% sure.
I dont think thats the problem because the lines around that specific line are all alike and they have no errors. Its just that one.
Reply
#5

A view in this way:

Код:
PlayerInfo[playerid][pGangWarn] = 0;
CurrentMoney[playerid] = 0;
UsedFind[playerid] = 0;
PlayerInfo[playerid][pTriageTime] = 0;
PlayerInfo[playerid][pCigar] = 0;
PlayerInfo[playerid][pSprunk] = 0;
PlayerInfo[playerid][pSpraycan] = 0;
CP[playerid] = 0;
Robbed[playerid] = 0;
SpawnChange[playerid] = 1;
PlayerInfo[playerid][pPot] = 0;
RobbedTime[playerid] = 0;
MoneyMessage[playerid] = 0;
Condom[playerid] = 0;
PlayerInfo[playerid][pCrack] = 0;
STDPlayer[playerid] = 0;
SexOffer[playerid] = 999;
SexPrice[playerid] = 0;
PlayerInfo[playerid][pC4] = 0;
PlayerInfo[playerid][pAdmin] = 0;
RepairOffer[playerid] = 999;
RepairPrice[playerid] = 0;
RepairCar[playerid] = 0;
PlayerInfo[playerid][pHelper] = 0;
TalkingLive[playerid] = INVALID_PLAYER_ID;
LiveOffer[playerid] = 999;
TakingLesson[playerid] = 0;
And show me errors
Reply
#6

Quote:
Originally Posted by HavingGood
Посмотреть сообщение
A view in this way:

Код:
PlayerInfo[playerid][pGangWarn] = 0;
CurrentMoney[playerid] = 0;
UsedFind[playerid] = 0;
PlayerInfo[playerid][pTriageTime] = 0;
PlayerInfo[playerid][pCigar] = 0;
PlayerInfo[playerid][pSprunk] = 0;
PlayerInfo[playerid][pSpraycan] = 0;
CP[playerid] = 0;
Robbed[playerid] = 0;
SpawnChange[playerid] = 1;
PlayerInfo[playerid][pPot] = 0;
RobbedTime[playerid] = 0;
MoneyMessage[playerid] = 0;
Condom[playerid] = 0;
PlayerInfo[playerid][pCrack] = 0;
STDPlayer[playerid] = 0;
SexOffer[playerid] = 999;
SexPrice[playerid] = 0;
PlayerInfo[playerid][pC4] = 0;
PlayerInfo[playerid][pAdmin] = 0;
RepairOffer[playerid] = 999;
RepairPrice[playerid] = 0;
RepairCar[playerid] = 0;
PlayerInfo[playerid][pHelper] = 0;
TalkingLive[playerid] = INVALID_PLAYER_ID;
LiveOffer[playerid] = 999;
TakingLesson[playerid] = 0;
And show me errors
These are the errors

Код:
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 028: invalid subscript (not an array or too many subscripts): "CP"
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : warning 215: expression has no effect
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 001: expected token: ";", but found "]"
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : error 029: invalid expression, assumed zero
C:\Users\Computer\Desktop\--\gamemodes\script.pwn(10217) : fatal error 107: too many error messages on one line

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


4 Errors.
Reallyyy need this fixed, Been on this problem for a bit, Thanks.
Reply
#7

The problem is here: CP[playerid] = 0;

Show me what is responsible for this function: CP
Reply
#8

Quote:
Originally Posted by HavingGood
Посмотреть сообщение
The problem is here: CP[playerid] = 0;

Show me what is responsible for this function: CP
Well I got this at the top of my script

Код:
new cpid[32];
enum Business
{
	CP,
	Text3D:bLabel,
	Cost,
	Payout,
	bName[128],
}
Could it be what you need?
Reply
#9

Try to remove the "," after bName.
Reply
#10

Код:
new cpid[40];
enum Business
{
	CP,
	Text3D:bLabel,
	Cost,
	Payout,
	bName[128]
}
or

Код:
new cpid[50];
enum Business
{
	CP[20],
	Text3D:bLabel,
	Cost,
	Payout,
	bName[128]
}

If the problem will continue do so:

Код:
if (!CP[playerid])
CP[playerid] = 0;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)