PDA

View Full Version : Some errors.


Misterflowers
17/09/2012, 09:12 PM
Here is the script:
#include <a_samp>
#pragma tabsize 0

new pickup;

public OnGameModeInit()
{
pickup = CreatePickup(1240, 23, 2034.1999, -1403.1999, 18.1000, -1);
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
ShowPlayerDialog(playerid,253,DIALOG_STYLE_MSGBOX, "Health","Buy Health ($1000)\nRocketLauncher ($8000=20 AMMO)","Select", "Close");
}
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 253)
{
if(response)
{
if(listitem == 0)
{
GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid, 100); //Health
GameTextForPlayer(playerid, "~r~Item ~g~Purchase!", 500, 0);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, -8000);
GivePlayerWeapon(playerid, 35 , 20);//rocketlaucher
GameTextForPlayer(playerid, "~r~Item ~g~Purchase!", 500, 0);
}
}
return 1;
}
return 0;
}
And this is the errors:
error 021: symbol already defined: "OnGameModeInit"
error 021: symbol already defined: "OnPlayerPickUpPickup"
error 021: symbol already defined: "OnDialogResponse"

TheArcher
17/09/2012, 09:47 PM
You have OnGameModeInit, OnPlayerPickUpPickup and OnDialogResponse callbacks called 1 or more times.

Misterflowers
17/09/2012, 11:38 PM
w/e, what I have to do?

mamorunl
17/09/2012, 11:45 PM
w/e, what I have to do?

1) Get rid of the #pragma tabsize 0 and learn to indent your code properly
2) 'whatever' is not a proper response
3) Find the duplicate callbacks in your code and merge them. Don't send your script or paste it here, we won't do it because the code is too messy.