Some errors.
#1

Here is the script:
Quote:

#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:
Quote:

error 021: symbol already defined: "OnGameModeInit"
error 021: symbol already defined: "OnPlayerPickUpPickup"
error 021: symbol already defined: "OnDialogResponse"

Reply
#2

You have OnGameModeInit, OnPlayerPickUpPickup and OnDialogResponse callbacks called 1 or more times.
Reply
#3

w/e, what I have to do?
Reply
#4

Quote:
Originally Posted by Misterflowers
Посмотреть сообщение
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)