HELP: 4 errors.
#1

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;
}
Reply
#2

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;
}
Reply
#3

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.
Reply
#4

26 errors? :O

Lemmy do a bit of code for you.
Reply
#5

ops, my fault - wrong topic
Reply
#6

mmrk that didnt work i still had 26 errors :/
Reply
#7

BUMP! i need help please?
Reply
#8

Add a } at the bottom of the code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)