5 Error Help please.
#1

Solved.
Reply
#2

can u please add a text after line 4248 and 4247.
like
pawn Код:
................. // Line 4247
................. // Line 4248
Reply
#3

While is line 4248
Reply
#4

and can i see line 4247?
Reply
#5

Here you go
Код:
	if(strcmp(cmd,"/register",true) == 0)
	{
	    	new length = strlen(cmdtext);
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
		idx++;
		}
		new offset = idx;
		new cmd[256]
	Line 4248 >	while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
		result[idx - offset] = cmdtext[idx];
		idx++;
		}
Reply
#6

Try this.
pawn Код:
if(strcmp(cmd,"/register",true) == 0)
    {
            new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
        idx++;
        }
        new offset = idx;
        new cmd[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
        result[idx - offset] = cmdtext[idx];
        idx++;
        }
Reply
#7

It gave me this
Код:
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4218) : error 033: array must be indexed (variable "cmd")
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4247) : warning 219: local variable "cmd" shadows a variable at a preceding level
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4248) : error 017: undefined symbol "result"
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4248) : error 029: invalid expression, assumed zero
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4250) : error 017: undefined symbol "result"
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4250) : warning 215: expression has no effect
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4250) : error 001: expected token: ";", but found "]"
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4250) : error 029: invalid expression, assumed zero
F:\TPG Roleplay\gamemodes\TPGSERVER.pwn(4250) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#8

result is not defined.
Reply
#9

This is the whole command.
Код:
if(strcmp(cmd,"/register",true) == 0)
    {
            new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
        idx++;
        }
        new offset = idx;
        new cmd[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
        result[idx - offset] = cmdtext[idx];
        idx++;
        }
		result[idx - offset] = EOS;
		if(!strlen(result))
		{
		SendClientMessage(playerid, COLOR_WHITE, "[ ! ] USAGE: /register (password)");
		return 1;
		}
		if (Logged[playerid] == 1) return scm(playerid,c_r,"[ ! ] Already Logged in !");
		if (udb_Exists(PlayerName(playerid))) return scm(playerid,c_r,"[ ! ] Account already exists, please use '/login password'.");
		new plrip[256];
		GetPlayerIp(playerid,plrip,sizeof(plrip));
		if (udb_Create(PlayerName(playerid),result))
		{
 			SystemMsg(playerid,"[ ! ] Account successfully created. Login with '/login password' now.");
			RemoveJob(playerid);
		 	SetJob(playerid,9);
			ResetPlayerRcash(playerid);
			GivePlayerTec9(playerid,-GetPlayerTec9(playerid));
			GivePlayerTec9B(playerid,-GetPlayerTec9B(playerid));
			GivePlayerRcash(playerid, 25);
			ResetPlayerAdminz(playerid);
			SavePlayer(playerid);
			clan = 255;
			return 1;
		}
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)