Undefined symbol string -
IvancheBG - 06.02.2012
I get the givecash command from tthe lvdm gamemode,but when i compile it gives me this errors:
Code:
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1351) : error 017: undefined symbol "string"
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1351) : error 017: undefined symbol "string"
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1351) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1351) : 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 1351:
Code:
format(string, sizeof(string), "You have sent $%d to %s.", giveplayer,giveplayerid, moneys);
Re: Undefined symbol string -
Michael@Belgium - 06.02.2012
Show line 1351, your probably need "new string[128];"
Re: Undefined symbol string -
Konstantinos - 06.02.2012
pawn Code:
new
string[ 128 ];
format( string, sizeof( string ), "You have sent $%d to %s.", giveplayer, giveplayerid, moneys );
// Rest
Re: Undefined symbol string -
IvancheBG - 06.02.2012
Steel this:
Code:
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1360) : error 017: undefined symbol "string"
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1360) : error 017: undefined symbol "string"
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1360) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1360) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Code:
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
new string[128];
format(string, sizeof(string), ""GREEN"You have sent $%d to %s.", giveplayer,giveplayerid, moneys);
SendClientMessage(playerid, COLOR, string);
format(string, sizeof(string), ""GREEN"%s gave you $%d.", moneys, sendername, playerid);
SendClientMessage(giveplayerid, COLOR, string);
Re: Undefined symbol string -
Konstantinos - 06.02.2012
Add the
string[ 128 ]; before 1350 line and if there is another command before line 1360 add again on the 1360 line
string[ 128 ];
Re: Undefined symbol string -
IvancheBG - 06.02.2012
Now this :
Code:
C:\Documents and Settings\user\Desktop\server samp\gamemodes\testserver.pwn(1350) : error 021: symbol already defined: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
AW: Undefined symbol string -
Drebin - 06.02.2012
Then rename it (to string2 or whatever). Also change the string name in the format();
Re: Undefined symbol string -
IvancheBG - 06.02.2012
I Fixed it! Thanks for help!
Re: Undefined symbol string -
edgargreat - 27.04.2013
Still got 1 error.
Code:
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\UWRP18.pwn(63634) : error 021: symbol already defined: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Undefined symbol string -
Goldilox - 28.04.2013
That means you have defined string twice. For one of the string, rename it to different one.
You might have something like this, new string[128], pName[MAX_PALYER_NAME];
new string[128];
For anyone form above, change to string2 or whatever. Make sure to also change it where you have used it.
HELPED?!