PDA

View Full Version : [Help Me] Error: (217) : error 030: compound state


Fitri
08/03/2013, 01:10 PM
I Just Create The Checkpoint Weapon But,, This Not Work

Can You Help Me ?

HERE CODE:

#include <a_samp>
#include <streamer>
#include <zcmd>

#define COLOR_RED 0xFF0000FF



#include <a_samp>
#include <a_samp>
#include <zcmd>




COMMAND:wherecp(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
// Do something
SetPlayerPos(playerid,2400.61, -1981.84, 13.89);
return 1;
}

COMMAND:skins(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
// Do something
SetPlayerPos(playerid,983.6278,2361.4456,10.9766);
SendClientMessage(playerid, COLOR_RED, "Go To The Red Marker To {FFFFFF}Change You Skins ");
return 1;
}

main()
{
print("\n--------------------------------------------------------");
print(" FOOD SHOPS "#le_TD_version"");
print("--------------------------------------------------------\n");
}

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FOOD SHOP | Version 0.1 ");
print("--------------------------------------\n");


CreateDynamicCP(914.2001,2006.7981,10.8203, 1.0);

return 1;
}

public OnFilterScriptExit()
{
print("\n--------------------------------------");
print("FOOD SHOP | Version 0.1 Unloaded ");
print("--------------------------------------\n");
return 1;
}



public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 914.2001,2006.7981,10.8203))
{
SendClientMessage(playerid, COLOR_RED, "[FAUZANZ]:{FFFFFF}Hye What You Want ?");
ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Food List By Fauzanz", "{FF0000}Nasi Ayam A1 {00FF33}$50$\n{FF0000}Nasi Lemak {00FF33}$50$\n{FF0000}Air Milo {00FF33}$70$\n{FF0000}Hot Coffe {00FF33}$70$\n{FF0000}Burger {00FF33}$25$\n{FF0000}Pizza {00FF33}$10$\n{FF0000}GodMod{00FF33}$99999$\n{FF00 00}Troll{00FF33}+9999$\n{FF0000}Wine {00FF33} $999$\n{FF0000}Tea O Beng{00FF33}$ 999$\n{FF0000}Rokok {00FF33}$70$\n{FF0000}Soda {00FF33}$2$\n{FF0000}Next Page {00FF33}\n", "Buy", "Cancle");
}
return 1;
}





public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 25)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, - 50);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Nasi Ayam A1. {00FF33}Have Fun!");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, - 50);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses {00FF33}You Have Bought {FF66FF}Nasi lemak {00FF33}Have Fun!");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, - 50);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);// Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Air Milo. {00FF33}Have Fun!");
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerWeapon(playerid, 31, 99999);
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, - 50);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Hot Coffe. {00FF33}Have Fun!");
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, - 50);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Burger {00FF33}Have Fun!");
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100);
GivePlayerMoney(playerid, - 50);
SetPlayerArmour(playerid,100);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Pizza. {00FF33}Have Fun!");
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) < 999999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
SetPlayerHealth(playerid,100000.00);
GivePlayerMoney(playerid, 99999);
SetPlayerArmour(playerid,100);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Godmode {00FF33}Have Fun!");
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) < -999999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, 9999);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
SetPlayerPos(playerid,897.2368,2022.4202,161.2891) ;
SendClientMessage(playerid, COLOR_RED, "[Susses] {00FF33}You Have Bought {FF66FF}Troll {00FF33}Have Fun!");
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) < 999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, - 999);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);// Eat Burger
SendClientMessage(playerid, 0xff8c00ff, "HINT: To drink, use the [FIRE KEY]."); // 0xff8c00ff - ORANGE
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) < 999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, - 999);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xff8c00ff, "HINT: To drink, use the [FIRE KEY]."); // 0xff8c00ff - ORANGE
}
if(listitem == 10)
{
if(GetPlayerMoney(playerid) < 70) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, - 70);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xff8c00ff, "HINT: To smoke, use the FIRE KEY."); // 0xff8c00ff - ORANGE
}
if(listitem == 11)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, - 2);
SetPlayerHealth(playerid,100);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerArmour(playerid,100);
SendClientMessage(playerid, 0xff8c00ff, "HINT: To drink, use the [FIRE KEY]."); // 0xff8c00ff - ORANGE
}
if(listitem == 12)
{
if(GetPlayerMoney(playerid) < -999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, 2);
}
if(listitem == 12)
{
if(GetPlayerMoney(playerid) < -999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, 2);
ResetPlayerWeapons(playerid);
ShowPlayerDialog(playerid, 228, DIALOG_STYLE_LIST, "Next Page", "{FF0000}Reset My Weapon {00FF33}Free\n", "Buy", "Cancle");
}
if(dialogid == 228)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < -999) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You don't have enough cash to purchase this food!");
GivePlayerMoney(playerid, 2);
ResetPlayerWeapons(playerid);
return 1;
}
}
}
return 1;
}

MP2
08/03/2013, 01:30 PM
1. Change your eye-ache-inducing text.
2. Indent your code.
3. Use [ pawn ] tags not code (or quote, as you have).
4. Post the actual error, we can't guess stuff.
5. Manners.
6. Why have you included a_samp.inc 3 times..?
7. You shouldn't use literal constant IDs for dialogs. You should use #define or an enum structure.
8. That's all folks.