SA-MP Forums Archive
HELP: 4 errors. - 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: HELP: 4 errors. (/showthread.php?tid=188263)



HELP: 4 errors. - BigAl - 07.11.2010

C:\Users\owner\Desktop\sa-mp tester server\gamemodes\G2x_andreas.pwn(1465) : error 017: undefined symbol "string"
C:\Users\owner\Desktop\sa-mp tester server\gamemodes\G2x_andreas.pwn(1465) : error 017: undefined symbol "string"
C:\Users\owner\Desktop\sa-mp tester server\gamemodes\G2x_andreas.pwn(1465) : error 029: invalid expression, assumed zero
C:\Users\owner\Desktop\sa-mp tester server\gamemodes\G2x_andreas.pwn(1465) : 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 get these errors with this code:

public OnPlayerUpdate(playerid)
{
new pName[MAX_PLAYER_NAME];
new w = 0;
while(w < (sizeof(ForbiddenWeapons))){
if(GetPlayerWeapon(playerid) == w){
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "* %s has been kicked: WEAPON CHEAT", pName);
SendClientMessageToAll(0xAA3333AA, string);
Kick(playerid);
}

new pName[MAX_PLAYER_NAME], string[128];
if(GetPlayerMoney(playerid) > pMoney[playerid])
{
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "* %s has been banned: MONEY CHEAT", pName);
SendClientMessageToAll(0xAA3333AA, string);
Kick(playerid);
}
return 1;
}


Re: HELP: 4 errors. - WillyP - 07.11.2010

pawn Код:
new string[64];
EDIT:

put this in your code:

pawn Код:
public OnPlayerUpdate(playerid)
{
new pName[MAX_PLAYER_NAME], string[128];
new w = 0;
while(w < (sizeof(ForbiddenWeapons))){
if(GetPlayerWeapon(playerid) == w){
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "* %s has been kicked: WEAPON CHEAT", pName);
SendClientMessageToAll(0xAA3333AA, string);
Kick(playerid);
}

if(GetPlayerMoney(playerid) > pMoney[playerid])
{
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "* %s has been banned: MONEY CHEAT", pName);
SendClientMessageToAll(0xAA3333AA, string);
Ban(playerid);
}
return 1;
}



Re: HELP: 4 errors. - BigAl - 07.11.2010

erm, i think i did it wrong, where do i put new string[64]; because i put it at the top and even copy and pasted your code above and got 26 errors.


Re: HELP: 4 errors. - WillyP - 07.11.2010

26 errors? :O

Lemmy do a bit of code for you.


Re: HELP: 4 errors. - mmrk - 07.11.2010

ops, my fault - wrong topic


Re: HELP: 4 errors. - BigAl - 07.11.2010

mmrk that didnt work i still had 26 errors :/


Re: HELP: 4 errors. - BigAl - 07.11.2010

BUMP! i need help please?


Re: HELP: 4 errors. - -Rebel Son- - 07.11.2010

Add a } at the bottom of the code.