Pawn compile errors
#1

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?
Reply
#2

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.
Reply
#3

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.
Reply
#4

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.
Reply
#5

show us your codes!
Reply
#6

I guess what you want it

pawn Код:
#define                   COLOR_GREEN                   0x33AA33AA

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

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {
Reply
#7

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;
}
Reply
#8

what are the errors you get now?
Reply
#9

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.
Reply
#10

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;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)