help Me 017: undefined Symbol
#1

C:\Users\Qaziii\Desktop\others\New.pwn(12) : warning 217: loose indentation
C:\Users\Qaziii\Desktop\others\New.pwn(12) : error 017: undefined symbol "dcmd_buyshoe"
C:\Users\Qaziii\Desktop\others\New.pwn(15) : error 017: undefined symbol "Playerid"
C:\Users\Qaziii\Desktop\others\New.pwn(15) : error 017: undefined symbol "Playerid"
C:\Users\Qaziii\Desktop\others\New.pwn(16) : error 017: undefined symbol "playerinfo"
C:\Users\Qaziii\Desktop\others\New.pwn(16) : error 017: undefined symbol "Playerid"
C:\Users\Qaziii\Desktop\others\New.pwn(16) : error 029: invalid expression, assumed zero
C:\Users\Qaziii\Desktop\others\New.pwn(16) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Help me Please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Code:
#include <a_samp>
#include <sscanf>
#define SCM SendClientMessage
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define Pinfo PlayerInfo
#define playerid Playerid
main()
{
    print("\n----------------------------------");
    print(" 1v1 DM server");
    print("----------------------------------\n");
dcmd_buyshoe(playerid, params[])
{
        
        if(GetPlayerMoney (playerid) < 300000) return SCM(playerid, COLOR_RED, "* You don't have $300000 to buy 1 Shoe.");
        if(playerinfo [playerid][Shoes] == 5) return SCM(playerid, COLOR_RED, "* You could not carry more than 5 shoes.");
		pInfo[playerid][Shoes] ++;
        new str1[100];
        GivePlayerMoney(playerid, -300000);
        format(str1,sizeof(str1),"[Super Shoe] You have bought 1 Shoe. - use /kick to use them. (Total Shoes: %d)", pInfo[playerid][Shoes]);
        SendClientMessage(playerid, COLOR_ROYALBLUE, str1);
        return 1;

dcmd_Skick(playerid, params[])
{
    
    new nPlayer = GetClosestPlayer(playerid);
    if(sscanf(skick,7 "us[127]", id, kick)) return SendClientMessage(playerid,0xFF7800FF, "Usage: /skick [ID]");
    //if(RestrictCMD == 1) return  SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command reason:[DISABLED]");
	if(spawned[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command While Dead.");
	if(IsPlayerInAnyVehicle(playerid)) return  SendClientMessage(playerid,COLOR_RED,"You Cannot Use This Command While In A Vehicle.");
	if(spawned[nPlayer] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Kick A Dead Body.");
    //if(OnDuty[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on an admin on duty");
	//if(IsInChallenge[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot rape in a challenge. You can take drugs and use /ad.");
	if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"Error: You cannot use this command in a vehicle.");
	//if(IsSpecing[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "Nobody close enough to Kick.");
	//if(duel[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "you cannot kick in duel area");
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid,x,y,z);
	if(kick[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"Error: Please wait before Kicking again.");

	if(IsPlayerInRangeOfPoint(nPlayer,6.0,x,y,z))
	{
        OnPlayerConnect:SendClientMessage:Welcome To DM
		if(aduty[nPlayer] == 1) return SCM(playerid, COLOR_RED,"You can't use this command on onduty admin.");
        //if(pInfo[nPlayer][Adminlevel] > 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
	    if(IsPlayerInAnyVehicle(nPlayer)) return SendClientMessage(playerid,COLOR_RED,"Error: The nearest player is in a vehicle.");
	    kick[playerid] =1;
	    gnstwall_injured[playerid] = SetTimerEx("gnstwall_injurd", 4.0, 1, 0, 0, 0, 0);

	    switch(random(10))
	    {
dcmd_fakechat(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id,text[128];
        if(sscanf(params, "us[127]", id, text)) return SendClientMessage(playerid,0xFF7800FF, "Usage: /fakechat [ID] [TEXT]");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid ,0xFF7800FF, "player offline");
        SendPlayerMessageToAll(id,text);
        return 1;
    }
    return 0;
}
Reply
#2

Code:
#define playerid Playerid
Remove this, it isn't needed and is breaking it (all the "Playerid" errors)

Code:
C:\Users\Qaziii\Desktop\others\New.pwn(16) : error 017: undefined symbol "playerinfo"
You are trying to call "playerinfo" which doesn't exist at all.

Code:
C:\Users\Qaziii\Desktop\others\New.pwn(12) : error 017: undefined symbol "dcmd_buyshoe"
EDIT: nvm about the dcmd part, I have never used it before
Reply
#3

Now my Errors Are:
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(15) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(15) : error 010: invalid function or declaration
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(16) : error 010: invalid function or declaration
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(17) : error 010: invalid function or declaration
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(23) : error 017: undefined symbol "playerinfo"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(23) : warning 215: expression has no effect
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(23) : error 001: expected token: ";", but found "]"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(23) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors. HElp BRo
Code:
#include <a_samp>
#include <sscanf>
#define SCM SendClientMessage
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define Pinfo PlayerInfo
#define COLOR_RED 0xFF0000FF
main()
{
    print("\n----------------------------------");
    print(" 1v1 DM server");
    print("----------------------------------\n");
}
public OnPlayerCommandText(playerid, cmdtext[])
 dcmd(buyshoe, 7, cmdtext);
    dcmd(Skick, 5, cmdtext);
    dcmd(fakechat, 8, cmdtext);
    return 0;
}
dcmd_buyshoe(playerid, params[])
{

        if(GetPlayerMoney (playerid) < 300000) return SCM(playerid, COLOR_RED, "* You don't have $300000 to buy 1 Shoe.");
        if(playerinfo [playerid][Shoes] == 5) return SCM(playerid, COLOR_RED, "* You could not carry more than 5 shoes.");
		pInfo[playerid][Shoes] ++;
        new str1[100];
        GivePlayerMoney(playerid, -300000);
        format(str1,sizeof(str1),"[Super Shoe] You have bought 1 Shoe. - use /kick to use them. (Total Shoes: %d)", pInfo[playerid][Shoes]);
        SendClientMessage(playerid, COLOR_ROYALBLUE, str1);
        return 1;

dcmd_Skick(playerid, params[])
{

    new nPlayer = GetClosestPlayer(playerid);
    if(sscanf(skick,7 "us[127]", id, kick)) return SendClientMessage(playerid,0xFF7800FF, "Usage: /skick [ID]");
    //if(RestrictCMD == 1) return  SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command reason:[DISABLED]");
	if(spawned[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command While Dead.");
	if(IsPlayerInAnyVehicle(playerid)) return  SendClientMessage(playerid,COLOR_RED,"You Cannot Use This Command While In A Vehicle.");
	if(spawned[nPlayer] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Kick A Dead Body.");
    //if(OnDuty[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on an admin on duty");
	//if(IsInChallenge[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot rape in a challenge. You can take drugs and use /ad.");
	if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"Error: You cannot use this command in a vehicle.");
	//if(IsSpecing[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "Nobody close enough to Kick.");
	//if(duel[nPlayer] == 1) return SendClientMessage(playerid, COLOR_RED, "you cannot kick in duel area");
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid,x,y,z);
	if(kick[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"Error: Please wait before Kicking again.");

	if(IsPlayerInRangeOfPoint(nPlayer,6.0,x,y,z))
	{
        OnPlayerConnect:SendClientMessage:Welcome To DM
		if(aduty[nPlayer] == 1) return SCM(playerid, COLOR_RED,"You can't use this command on onduty admin.");
        //if(pInfo[nPlayer][Adminlevel] > 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
	    if(IsPlayerInAnyVehicle(nPlayer)) return SendClientMessage(playerid,COLOR_RED,"Error: The nearest player is in a vehicle.");
	    kick[playerid] =1;
	    gnstwall_injured[playerid] = SetTimerEx("gnstwall_injurd", 4.0, 1, 0, 0, 0, 0);

	    switch(random(10))
	    {
dcmd_fakechat(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id,text[128];
        if(sscanf(params, "us[127]", id, text)) return SendClientMessage(playerid,0xFF7800FF, "Usage: /fakechat [ID] [TEXT]");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid ,0xFF7800FF, "player offline");
        SendPlayerMessageToAll(id,text);
        return 1;
    }
    return 0;
}
Reply
#4

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
 dcmd(buyshoe, 7, cmdtext);
    dcmd(Skick, 5, cmdtext);
    dcmd(fakechat, 8, cmdtext);
    return 1;
}
Your buyshoe and skick commands also don't have any closing braces.
Reply
#5

Ty now Only
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(16) : warning 217: loose indentation
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(16) : error 017: undefined symbol "dcmd_Skick"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(17) : error 017: undefined symbol "dcmd_fakechat"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 017: undefined symbol "playerinfo"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : warning 215: expression has no effect
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 001: expected token: ";", but found "]"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 029: invalid expression, assumed zero
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#6

C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(16) : error 017: undefined symbol "dcmd_Skick"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(17) : error 017: undefined symbol "dcmd_fakechat"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 017: undefined symbol "playerinfo"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 017: undefined symbol "Shoes"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 029: invalid expression, assumed zero
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#7

Quote:
Originally Posted by Robber7
View Post
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(16) : error 017: undefined symbol "dcmd_Skick"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(17) : error 017: undefined symbol "dcmd_fakechat"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 017: undefined symbol "playerinfo"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 017: undefined symbol "Shoes"
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : error 029: invalid expression, assumed zero
C:\Users\Qaziii\Desktop\others\hehehehehe.pwn(24) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
"undefined symbol" means you haven't created the variable.
Reply
#8

Help me I am New In SCripting Plzzzzzzz
Reply
#9

Fixed in: https://sampforum.blast.hk/showthread.php?tid=507346
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)