[Pomoc]sscanf

Započeo ‹Fox›, Septembar 09, 2010, 15:37:33 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

ja sam ubacio onaj sscanf i kad idem compile izbaci mi ove errore:

D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(206) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(206) : error 017: undefined symbol "cmd_airc"
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(206) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(206) : fatal error 107: too many error messages on one line

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


4 Errors.


evo komande:
CMD:airc(playerid, params[])
{
	if(GetPVarInt(playerid,"Admin_Nivo") >= 1)
	{
	    new string[128];
	    if(sscanf(params,"s[128]",string)) return SendClientMessage(playerid,0x20B2AAAA, "Nisi nista upisao.");
		}
		else
	    {
	        new string2[128], pName[MAX_PLAYER_NAME];
	        GetPlayerName(playerid,pName,sizeof(pName));
			format(string2,sizeof(string2),"%s: %S",pName,string);
	    }
	}
	else
	{
		SendClientMessage(playerid,0x20B2AAAA, "Nisi admin");
	}
	return 1;
}

Jesi dodo pod public OnPlayerCommandText(playerid, cmdtext[])

cmd(airc, 4, cmdtext);


nije CMD nego DCMD -.-

Kod: C
dcmd(ime, duzina, cmdtext);

e a koja bi duzina bila za ovu komandu? kak da nadjem duzinu kak se to gleda=?

nastoe

Citat: ƨÑ,яακƨı poslato Septembar 09, 2010, 16:24:31 POSLE PODNE
nije CMD nego DCMD -.-

Kod: C
dcmd(ime, duzina, cmdtext);

Citat: Elvis_Elix poslato Septembar 09, 2010, 16:08:03 POSLE PODNE
Jesi dodo pod public OnPlayerCommandText(playerid, cmdtext[])

cmd(airc, 4, cmdtext);

Rade sutite kad neznate

1. Nije sscanf nego ZCMD, sscanf je string splitter
2. Probaj umjesto CMD: staviti COMMAND:

EDIT: Jao sta si ti [cenzura]osti stavljo u komandu.... :S

Kod: c
COMMAND:airc(playerid, params[])
{
	new
	string[128],
	pName[MAX_PLAYER_NAME],
	string2[128];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	if(GetPVarInt(playerid,"Admin_Nivo") >= 1)
	{
	    if(sscanf(params,"s",string)) return SendClientMessage(playerid,0x20B2AAAA, "Nisi nista upisao.");
		}
		else
	    {
			format(string2,sizeof(string2),"%s: %s",pName,string);
			SendClientMessage(playerid,0x20B2AAAA, string2);
	    }
	}
	else
	{
		SendClientMessage(playerid,0x20B2AAAA, "Nisi admin");
	}
	return 1;
}

Poslednja Izmena: Septembar 09, 2010, 16:34:32 POSLE PODNE od X-Ray

Citat: X-Ray poslato Septembar 09, 2010, 16:29:29 POSLE PODNE
Citat: ƨÑ,яακƨı poslato Septembar 09, 2010, 16:24:31 POSLE PODNE
nije CMD nego DCMD -.-

Kod: C
dcmd(ime, duzina, cmdtext);

Citat: Elvis_Elix poslato Septembar 09, 2010, 16:08:03 POSLE PODNE
Jesi dodo pod public OnPlayerCommandText(playerid, cmdtext[])

cmd(airc, 4, cmdtext);

Rade sutite kad neznate

1. Nije sscanf nego ZCMD, sscanf je string splitter
2. Probaj umjesto CMD: staviti COMMAND:

Probo sam stavit COMMAND i nece opet...evo sad sam izbriso sscanf pa ako mi mozete dati link za download sscanf i kak to sve ubacit jer mislim da nije dobro ubaceno  :-\

nastoe

probaj ovo sta sam ti gore napiso

ALoo sta da sutim zeznosam se u slovu pasam napiso cmd umjesto dcmd  


Citat: X-Ray poslato Septembar 09, 2010, 16:33:46 POSLE PODNE
probaj ovo sta sam ti gore napiso
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 017: undefined symbol "cmd_airc"
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : fatal error 107: too many error messages on one line

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


4 Errors.

:'( :'( :'( :'(

nastoe

Citat: Elvis_Elix poslato Septembar 09, 2010, 16:33:56 POSLE PODNE
ALoo sta da sutim zeznosam se u slovu pasam napiso cmd umjesto dcmd  

I zeznuo si se kad si ovo napiso da treba staviti?

cmd(airc, 4, cmdtext);
i da komanda mora biti ispod ovog callbacka OnPlayerCommandText(playerid, cmdtext[])

To si se sve zeznuo? Ajd´ se rade usima poklopi nego ici lagati

Citat: [ST]DeFox poslato Septembar 09, 2010, 16:35:50 POSLE PODNE
Citat: X-Ray poslato Septembar 09, 2010, 16:33:46 POSLE PODNE
probaj ovo sta sam ti gore napiso
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 017: undefined symbol "cmd_airc"
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(208) : fatal error 107: too many error messages on one line

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


4 Errors.

:'( :'( :'( :'(
Daj mi liniju 207 & 208


Poslednja Izmena: Septembar 09, 2010, 16:37:30 POSLE PODNE od X-Ray

nesta sam radio pa je error u novoj liniji..sve je isto samo sam nesta iso probavat
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(207) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(207) : error 017: undefined symbol "cmd_airc"
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(207) : error 029: invalid expression, assumed zero
D:\mario dokumenti2\streamer\streamed\Filterscripts\admin2.pwn(207) : fatal error 107: too many error messages on one line

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


4 Errors.

evo ti linija 206,207,208
}
	COMMAND:airc(playerid, params[])
{

nastoe

hm moze biti nekoliko stvari

1. Vjerojatno si stavio komandu ispod OnPlayerCommandText
2. Vjerojatno postoji jos jedna komanda s tim nazivom
3. Ona gore komanda nema return

Citat: X-Ray poslato Septembar 09, 2010, 16:29:29 POSLE PODNE
Citat: ƨÑ,яακƨı poslato Septembar 09, 2010, 16:24:31 POSLE PODNE
nije CMD nego DCMD -.-

Kod: C
dcmd(ime, duzina, cmdtext);

Citat: Elvis_Elix poslato Septembar 09, 2010, 16:08:03 POSLE PODNE
Jesi dodo pod public OnPlayerCommandText(playerid, cmdtext[])

cmd(airc, 4, cmdtext);

Rade sutite kad neznate

1. Nije sscanf nego ZCMD, sscanf je string splitter
2. Probaj umjesto CMD: staviti COMMAND:

EDIT: Jao sta si ti [cenzura]osti stavljo u komandu.... :S

Kod: c
COMMAND:airc(playerid, params[])
{
	new
	string[128],
	pName[MAX_PLAYER_NAME],
	string2[128];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	if(GetPVarInt(playerid,"Admin_Nivo") >= 1)
	{
	    if(sscanf(params,"s",string)) return SendClientMessage(playerid,0x20B2AAAA, "Nisi nista upisao.");
		}
		else
	    {
			format(string2,sizeof(string2),"%s: %s",pName,string);
			SendClientMessage(playerid,0x20B2AAAA, string2);
	    }
	}
	else
	{
		SendClientMessage(playerid,0x20B2AAAA, "Nisi admin");
	}
	return 1;
}



::) ::) ::) ::) ::)

http://balkan-samp.com/forum/index.php?topic=195.0

Citat: X-Ray poslato Septembar 09, 2010, 16:44:05 POSLE PODNE
hm moze biti nekoliko stvari

1. Vjerojatno si stavio komandu ispod OnPlayerCommandText
2. Vjerojatno postoji jos jedna komanda s tim nazivom
3. Ona gore komanda nema return
1. nisam
2. nepostoji
3. eto ti komanda koju imam sada i vidit ces da ima return
Kod: c
COMMAND:airc(playerid, params[])
{
   new
   string[128],
   pName[MAX_PLAYER_NAME],
   string2[128];
   GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
   if(GetPVarInt(playerid,"Admin_Nivo") >= 1)
   {
       if(sscanf(params,"s",string)) return SendClientMessage(playerid,0x20B2AAAA, "Nisi nista upisao.");
      }
      else
       {
         format(string2,sizeof(string2),"%s: %s",pName,string);
         SendClientMessage(playerid,0x20B2AAAA, string2);
       }
   }
   else
   {
      SendClientMessage(playerid,0x20B2AAAA, "Nisi admin");
   }
   return 1;
}