Stuck with couple errors, need help. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stuck with couple errors, need help. (
/showthread.php?tid=187582)
Stuck with couple errors, need help. -
OldDirtyBastard - 03.11.2010
Hello im kinda stuck with couple errors here:
pawn Код:
(2572) : error 029: invalid expression, assumed zero
(2572) : error 029: invalid expression, assumed zero
(2572) : warning 215: expression has no effect
(2572) : error 001: expected token: ";", but found "]"
(2572) : fatal error 107: too many error messages on one line
pawn Код:
if(gangcmd==1) {
if(playerGang[playerid]>0) {
SendClientMessage(playerid, CWARN, "You are already in a gang!");
return 1;
}
for(new i = 1; i < MAX_GANGS; i++) {
if(gangInfo[i][0]==0) {
format(gangNames[i], MAX_GANG_NAME, "%s", tmp2);
gangInfo[i][0]=1;
gangInfo[i][1]=1;
(line 2572)>>> gangInfo[i][2]=PlColor[playerid];
gangMembers[i][0] = playerid;
format(string2, sizeof(string2),"You created gang '%s' (id: %d)", gangNames[i], i);
SendClientMessage(playerid, CINFO, string2);
format(string2, sizeof(string2),"Gang with the name : '%s' (id: %d) has been created by %s", gangNames[i], i, playername);
print(string2);
playerGang[playerid]=i;
return 1;
}
}
return 1;
might help me with this, im kinda confused what to do next, the error definitions that i found
here
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf confuse me a bit...
thanks regards.
Re: Stuck with couple errors, need help. -
Jeffry - 03.11.2010
Can you show the "new gangInfo" and the "new PlColor" please.
Re: Stuck with couple errors, need help. -
OldDirtyBastard - 03.11.2010
pawn Код:
new gangInfo[MAX_GANGS][3];
pawn Код:
#define PlColor 0xFFFF00AA
Re: Stuck with couple errors, need help. -
Jeffry - 03.11.2010
Use:
Re: Stuck with couple errors, need help. -
OldDirtyBastard - 03.11.2010
no, that doesnt helps, it has even troubles with it
pawn Код:
(52) : error 017: undefined symbol "i" <<<< the new gangInfo[i][2]=PlColor; at line 52
(52) : error 001: expected token: "}", but found ";"
(2571) : error 032: array index out of bounds (variable "gangInfo")
(2571) : error 029: invalid expression, assumed zero
(2571) : warning 215: expression has no effect
(2571) : error 001: expected token: ";", but found "]"
(2571) : fatal error 107: too many error messages on one line
Re: Stuck with couple errors, need help. -
Jeffry - 03.11.2010
Noooooooo!!! I meant at the code, not at the "new".
Change Line 2572 (The one with error) to the piece I gave you (simply remove the '[playerid]').
And un-do the changes at the "new" one.
Re: Stuck with couple errors, need help. -
OldDirtyBastard - 03.11.2010
ahhh lol

my bad thanks dude
Re: Stuck with couple errors, need help. -
Jeffry - 03.11.2010
No problem. Have fun.