PDA

View Full Version : how to fix this?


Er@x3r
29/11/2012, 11:17 AM
#include <a_samp>

#define COLOR_ORANGE 0xFF9900AA

if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You must be an Administrator to use this command.");
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/weapons", true) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Weapon List", "Knuckles \nGolf \ nNightstick \nKnife \nBat \nShovel \nPool \nKatana \nChainsaw \nGrenade \nTearGas \nMolotov \n9mm \nSilenced 9mm \nDeagle \nShotgun \nSawnoff Shotgun \nCombat Shotgun \nUzi \nMP5 \nAK-47 \nM4 \nTec-9 \nRifle \nSniper \nRPG \nFlamethrower \Minigun \", "I want this!", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{

if(listitem == 0)

GivePlayerWeapon(playerid,1, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}
if(listitem == 1)
{

GivePlayerWeapon(playerid,2, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 2)
{

GivePlayerWeapon(playerid,3, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}
if(listitem == 3)
{

GivePlayerWeapon(playerid,4, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 4)
{

GivePlayerWeapon(playerid,5, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}
if(listitem == 5)
{

GivePlayerWeapon(playerid,6, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}
if(listitem == 6)
{

GivePlayerWeapon(playerid,7, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 7)
{

GivePlayerWeapon(playerid,8, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 8)
{

GivePlayerWeapon(playerid,9, 1);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}

if(listitem == 9)
{

GivePlayerWeapon(playerid,16, 100);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 10)
{

GivePlayerWeapon(playerid,17, 100);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 11)
{

GivePlayerWeapon(playerid,18, 100);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 12)
{

GivePlayerWeapon(playerid,22, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 13)
{

GivePlayerWeapon(playerid,23, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 14)
{

GivePlayerWeapon(playerid,24, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 15)
{

GivePlayerWeapon(playerid,24, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 16)
{

GivePlayerWeapon(playerid,24, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 17)
GivePlayerWeapon(playerid,25, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 18)
{

GivePlayerWeapon(playerid,26, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 19)
{

GivePlayerWeapon(playerid,27, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 20)
{

GivePlayerWeapon(playerid,28, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 21)
{

GivePlayerWeapon(playerid,29, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 22)
{

GivePlayerWeapon(playerid,30, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 23)
{

GivePlayerWeapon(playerid,30, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 24)
{

GivePlayerWeapon(playerid,31, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 25)
{

GivePlayerWeapon(playerid,32, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 26)
{

GivePlayerWeapon(playerid,33, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 27)
{

GivePlayerWeapon(playerid,34, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 29)
{

GivePlayerWeapon(playerid,35, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 30)
{

GivePlayerWeapon(playerid,37, 2000);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);

}
if(listitem == 31)
{

GivePlayerWeapon(playerid,38, 99999);
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Have fun with this weapon!", name);
SendClientMessageToAll(COLOR_ORANGE, string);
TogglePlayerControllable(playerid,1);
}
}
}
return 1;














C:\Documents and Settings\Eraxer\Desktop\samp\filterscripts\Eadmin. pwn(5) : error 010: invalid function or declaration
C:\Documents and Settings\Eraxer\Desktop\samp\filterscripts\Eadmin. pwn(10) : error 027: invalid character constant
C:\Documents and Settings\Eraxer\Desktop\samp\filterscripts\Eadmin. pwn(10) : error 027: invalid character constant
C:\Documents and Settings\Eraxer\Desktop\samp\filterscripts\Eadmin. pwn(10) : error 017: undefined symbol "I"
C:\Documents and Settings\Eraxer\Desktop\samp\filterscripts\Eadmin. pwn(10) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

iGetty
29/11/2012, 11:18 AM
Wrap it in [pawn] tags.

From what I see, you need to change the first line to this:

#include <a_samp>

GiamPy.
29/11/2012, 11:19 AM
You have wrote:
#include <a_sam

Instead of:
#include <a_samp>

:)

Er@x3r
29/11/2012, 11:34 AM
thanks, but i have other problems