SA-MP Forums Archive
Pawn compile errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pawn compile errors (/showthread.php?tid=453507)



Pawn compile errors - selmas - 25.07.2013

When I try to compile, I get those errors:

D:\toolz\myfilterscripts.pwn(36) : warning 204: symbol is assigned a value that is never used: "mypickup"
D:\toolz\myfilterscripts.pwn(43) : error 010: invalid function or declaration
D:\toolz\myfilterscripts.pwn(71) : warning 203: symbol is never used: "OnPlayerPickUpPickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Line 36: mypickup = CreatePickup(1210,2, -number, -number, number, -1);
Line 43: OnPlayerPickUpPickup(playerid, 1210)
Line 71: I don't have line 71, the last one is 70

Can anyone help me?


Re: Pawn compile errors - JimmyCh - 25.07.2013

Don't use it like that, use
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {
You don't change a public call..

EDIT:Sorry didn't realise about that mypickup thing, use the code above now, will work.


Re: Pawn compile errors - selmas - 25.07.2013

Thank you, but I got more errors now. Sorry if I did it wrong but I'm new at Pawno:

D:\toolz\myfilterscripts.pwn(37) : warning 204: symbol is assigned a value that is never used: "mypickup"
D:\toolz\myfilterscripts.pwn(44) : error 010: invalid function or declaration
D:\toolz\myfilterscripts.pwn(46) : error 017: undefined symbol "pickupid"
D:\toolz\myfilterscripts.pwn(4 : error 017: undefined symbol "COLOR_GREEN"
D:\toolz\myfilterscripts.pwn(51) : warning 217: loose indentation
D:\toolz\myfilterscripts.pwn(53) : warning 213: tag mismatch
D:\toolz\myfilterscripts.pwn(56) : error 017: undefined symbol "COLOR_GREEN"
D:\toolz\myfilterscripts.pwn(59) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: Pawn compile errors - JimmyCh - 25.07.2013

Can you show us your codes atleast? Not just the lines? Everything from the createpickup to the OnPlayerPickUpPickup, this will let us fix the errors.
Also use [ pawn] and [/pawn] so we can visualize it better.


Re: Pawn compile errors - _Khaled_ - 25.07.2013

show us your codes!


Re: Pawn compile errors - _Khaled_ - 25.07.2013

I guess what you want it

pawn Код:
#define                   COLOR_GREEN                   0x33AA33AA

mypickup = CreatePickup(..........................................

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {



Re: Pawn compile errors - selmas - 25.07.2013

pawn Код:
#include <a_samp>
#include <zcmd>

{
new mypickup;
//
mypickup = CreatePickup(1210,2, -somenumbers, -somenumbers, somenumbers, -1);
}
return 1

;
}

public OnPlayerPickUpPickup(playerid, 1210)
{
    if(pickupid == mypickup)
    {
    SendClientMessage(playerid, COLOR_GREEN, "text");
    SetPlayerCheckpoint(playerid, somenumbers,somenumbers,somenumbers, 3.0);
    }
if (IsPlayerInCheckpoint(playerid))
{
  GivePlayerMoney(playerid, 100.0);
}
{
    SendClientMessage(playerid, COLOR_GREEN, "text");
    return 1;
}
return 1;
}



Re: Pawn compile errors - Vanter - 25.07.2013

what are the errors you get now?


Re: Pawn compile errors - selmas - 25.07.2013

D:\toolz\myfilterscripts.pwn(37) : warning 204: symbol is assigned a value that is never used: "mypickup"
D:\toolz\myfilterscripts.pwn(44) : error 010: invalid function or declaration
D:\toolz\myfilterscripts.pwn(46) : error 017: undefined symbol "pickupid"
D:\toolz\myfilterscripts.pwn(4 : error 017: undefined symbol "COLOR_GREEN"
D:\toolz\myfilterscripts.pwn(51) : warning 217: loose indentation
D:\toolz\myfilterscripts.pwn(53) : warning 213: tag mismatch
D:\toolz\myfilterscripts.pwn(56) : error 017: undefined symbol "COLOR_GREEN"
D:\toolz\myfilterscripts.pwn(59) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: Pawn compile errors - ScRipTeRi - 25.07.2013

pawn Код:
#include <a_samp>
#include <zcmd>

new mypickup;

public OnGameModeInit()
{
mypickup = CreatePickup(1210,2, pos x,pos y,pos z, -1);
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {
    SendClientMessage(playerid, -1, "text");
    SetPlayerCheckpoint(playerid, pos x,pos y,pos z, 3.0);
    }
    if(IsPlayerInCheckpoint(playerid))
    {
    GivePlayerMoney(playerid, 100);
    }
    else
    {
    SendClientMessage(playerid, -1 , "text");
    return 1;
    }
    return 1;
    }