[HELP] Warnings !!!!!!!
#1

Alright i made this Thread again cuz same problem still presents .

When i compile this FS it says these Errors

Код:
warning 203: symbol is never used: "join"
Код:
warning 203: symbol is never used: "event"
here is the Code

pawn Код:
COMMAND:join(playerid)
{
    if(cuffed[playerid] || tazed[playerid] || BlindFold[playerid] == true || GetPVarInt(playerid, "Tied") == 1 || PlayerInfo[playerid][jailtime])
        return SendClientError(playerid, "You can't use this command while tazed/cuffed/tied/blindfolded.");
    if(!event) return SendClientError(playerid, "There is no event!");
    if(event && !eventsignup) return SendClientError(playerid, "You are too late!");
    if(PlayerTemp[playerid][isevent]) return SendClientError(playerid, "You already are in an event!");
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 99.0);
    TeleportCheck(playerid);
    format(iStr, sizeof(iStr), "7..: [EVENT] %s[%d] has entered the ongoing event. ::.", PlayerName(playerid), playerid);
    iEcho(iStr);
and
pawn Код:
COMMAND:event(playerid, params[])
{
    if(GetAdminLevel(playerid) < 6) return SendClientError(playerid, CANT_USE_CMD);
    if(event == 1) return SendClientError(playerid, CANT_USE_CMD);
    new tmp[ 10 ], tmp2[ 15 ];
    if(sscanf(params, "sz", tmp, tmp2)) return SCP(playerid, "<derby/sumo/lms/custom/shipfight/stop>");
    ResetEvent();

    if(!strcmp(tmp, "stop", true, 4))
    {
        event = 0;
        SendClientMessage(playerid, COLOR_YELLOW, "Event stopped.");
        return 1;
    }
anyone can help ?!
Reply
#2

Yes. First, you need to learn how to use ZCMD --> https://sampforum.blast.hk/showthread.php?tid=280476

Second, your problem is that you don't have it under the callback OnPlayerCommandText

Example:
pawn Код:
// Somewhere in your code:
CMD:event(playerid, params[])
{
// stuff here
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
// Your Commands here
zcmd(event,5, cmdtext);
return 0;
}
Reply
#3

Include the zcmd.

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

// commands here
Quote:
Originally Posted by Elie1996
Посмотреть сообщение
Second, your problem is that you don't have it under the callback OnPlayerCommandText
That's totally wrong. Commands MUST be outside of any callback.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Include the zcmd.

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

// commands here

got these errors
pawn Код:
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(5) : error 017: undefined symbol "GetAdminLevel"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(5) : error 017: undefined symbol "SendClientError"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(6) : error 017: undefined symbol "event"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(6) : error 017: undefined symbol "SendClientError"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(8) : error 017: undefined symbol "sscanf"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(8) : error 017: undefined symbol "SCP"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(9) : error 017: undefined symbol "ResetEvent"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(13) : error 017: undefined symbol "event"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(13) : warning 215: expression has no effect
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(14) : error 017: undefined symbol "COLOR_YELLOW"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(19) : error 017: undefined symbol "event"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(19) : warning 215: expression has no effect
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(20) : error 017: undefined symbol "eventsignup"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(20) : warning 215: expression has no effect
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(22) : error 017: undefined symbol "COLOR_YELLOW"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(23) : error 017: undefined symbol "COLOR_YELLOW"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(25) : error 017: undefined symbol "iStr"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(25) : error 017: undefined symbol "iStr"
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(25) : error 029: invalid expression, assumed zero
E:\Documents and Settings\YAO\Desktop\Untitled.pwn(25) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


17 Errors.
maybe i need to put it in my GM not as a FS ?
Reply
#5

Sorry not a scripter and dunno how to define this
Reply
#6

You're missing a close / open bracket, either { [ ( or ) ] } somewhere in your script. Find it and put it in. And, if you're not a scripter... why are you scripting?
Reply
#7

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
You're missing a close / open bracket, either { [ ( or ) ] } somewhere in your script. Find it and put it in. And, if you're not a scripter... why are you scripting?
first thanks for help , 2nd yes im not a scripter but i love these things and im trying to learn and i think there's no problem in that or what do you think ?
Reply
#8

Either missing bracket like DanishHaq said or you pasted a code from somewhere else without copying those symbols as well.
Reply
#9

cant find the palce of missing bracket , please is anyone free so i can send him the Whole Code over pm and tries to solve it it'll be rewally great
Reply
#10

Quote:
Originally Posted by Alexander8
Посмотреть сообщение
cant find the palce of missing bracket , please is anyone free so i can send him the Whole Code over pm and tries to solve it it'll be rewally great
There are some good bracket finders out there, try and find one, and then copy callbacks separately from your code to see which one doesn't have the closing / opening bracket.

Here's a good one you could use: https://sampforum.blast.hk/showthread.php?tid=291018
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)