Help needed urgently.
#1

Okay thanks for taking your time to read this, but i got a hugh problem..

Suddenly everything became undefined and got 26 errors.. no need for the code nor warnings because it's that easy to explain..

Any help?
Reply
#2

You are missing a bracket "{" or "}".
Reply
#3

Here's the command, i'm still getting the errors.

Код:
if(strcmp(cmd, "/accepthelpme", true) == 0 || strcmp(cmd, "/ahm", true) == 0)
		{
		    if(IsPlayerConnected(playerid))
		    {
				tmp = strtok(cmdtext, idx);
				giveplayerid = strval(tmp);
				if(PlayerInfo[playerid][pTester] >= 1)
				{
					    new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' ')) {
						idx++;
						}
						new offset = idx;
					    new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
						result[idx - offset] = cmdtext[idx];
						idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_SYSTEM, "[Helper INFO] - /(a)ccept(h)elp(m)e [playerid]");
						}

					    new playa;
					    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					    format(string, sizeof(string), "Helper %s has accepted your help request, please be pateint.", GetPlayerNameEx(playerid), result);
						SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
						}
					    format(string, sizeof(string), "[Helper Message]Helper %s has accepted the help request from %s[ID:[%s]", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
						Testermsg(string);
	  {
						return 1;
				}
			}
		}
Reply
#4

4th last line. Whats that { doing there or is that just the pawn codes that fucked it up?
Reply
#5

try this

Код:
if(strcmp(cmd, "/accepthelpme", true) == 0 || strcmp(cmd, "/ahm", true) == 0)
{
    if(IsPlayerConnected(playerid)) {
        tmp = strtok(cmdtext, idx);
        giveplayerid = strval(tmp);
        if(PlayerInfo[playerid][pTester] >= 1) {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' ')) {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result)) {
                if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_SYSTEM, "[Helper INFO] - /(a)ccept(h)elp(m)e [playerid]");
            }

            new playa;
            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "Helper %s has accepted your help request, please be pateint.", GetPlayerNameEx(playerid), result);
            SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
        }
        format(string, sizeof(string), "[Helper Message]Helper %s has accepted the help request from %s[ID:     [%s]", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
        Testermsg(string);
            return 1;
        }
    }
    return 1;
}
Reply
#6

Army of two my errors still show up here they are

Код:
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1515) : error 004: function "split" is not implemented
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1543) : error 017: undefined symbol "Get2DZone"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1550) : error 017: undefined symbol "Get2DZone"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1557) : error 017: undefined symbol "Get2DZone"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1580) : error 004: function "split" is not implemented
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1645) : error 004: function "split" is not implemented
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(1871) : error 004: function "split" is not implemented
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2093) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2094) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2095) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2096) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2097) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2098) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2099) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2100) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2101) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2102) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2103) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2104) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2105) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2106) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2107) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2108) : error 017: undefined symbol "PreloadAnimLib"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2202) : error 017: undefined symbol "Adminmsg"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2203) : error 017: undefined symbol "Testermsg"
C:\Documents and Settings\Yamoo\My Documents\NGRP\gamemodes\NGRPv1.0.pwn(2222) : error 017: undefined symbol "RPName"

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


26 Errors.
Reply
#7

Код:
if(strcmp(cmd, "/accepthelpme", true) == 0 || strcmp(cmd, "/ahm", true) == 0)
{
    if(IsPlayerConnected(playerid)) {
        tmp = strtok(cmdtext, idx);
        giveplayerid = strval(tmp);
        if(PlayerInfo[playerid][pTester] >= 1) {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' ')) {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result)) {
                if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_SYSTEM, "[Helper INFO] - /(a)ccept(h)elp(m)e [playerid]");
            }

            new playa;
            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "Helper %s has accepted your help request, please be pateint.", GetPlayerNameEx(playerid), result);
            SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
        }
        format(string, sizeof(string), "[Helper Message]Helper %s has accepted the help request from %s[ID:     [%s]", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
        Testermsg(string);
            return 1;
    }
    return 1;
}
Reply
#8

Still not fixing the errors..

I appreciate this armyoftwo, your helping me quite abite.
Reply
#9

Your problem is elsewhere, not in the command that armyoftwo wrote correctly (as far as you can tell by just scanning it).

As said before you are missing somewhere a brace. That doesn't need to be in the exact lines your compiler spits out, that can be in a line where you call those named functions as well.
Reply
#10

Yes, i know it could by but everything was fine untill i added that command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)