Anketa
Pitanje:
Glup si
Opcije 1: Nisi glup
glasova: 1
Opcije 2: Nisi glup
glasova: 1
Problem(error/warning): radio sam whisper komandu i kad ti neko nesto sapne pise samo ko ti je sapnuo bez sta je sapnuo
Dio skripte:
CMD:whisper(playerid,params[])
{
new id,text,str[500];
if(sscanf(params, "uz",id)) return SCM(playerid,-1,"USAGE: /whisper [playerid] [text]"); //probao sam sam da promenim da bude ud i nista
format(str,sizeof(str), "%s ti sapuce: %s",GetName(playerid),text);
SCM(id,-1,str);
return 1;
}
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[20:40:00]
[20:40:00] Server Plugins
[20:40:00] --------------
[20:40:00] Loading plugin: sscanf
[20:40:00]
[20:40:00] ===============================
[20:40:00] sscanf plugin loaded.
[20:40:00] (c) 2009 Alex "Y_Less" Cole
[20:40:00] 0.3d-R2 500 Players "dnee"
[20:40:00] ===============================
[20:40:00] Loaded.
[20:40:00] Loading plugin: streamer
[20:40:00]
*** Streamer Plugin v2.6.1 by Incognito loaded ***
[20:40:00] Loaded.
[20:40:00] Loading plugin: Whirlpool
[20:40:00]
[20:40:00] ==================
[20:40:00]
[20:40:00] Whirlpool loaded
[20:40:00]
[20:40:00] ==================
[20:40:00]
[20:40:00] Loaded.
[20:40:00] Loaded 3 plugins.
[20:40:00]
[20:40:00] Filterscripts
[20:40:00] ---------------
[20:40:00] Loading filterscript 'TDE.amx'...
[20:40:00] Loaded 1 filterscripts.
[20:40:00]
[20:40:00] =======================================
[20:40:00] | |
[20:40:00] | YSI version 1.04.0000 |
[20:40:00] | By Alex "Y_Less" Cole |
[20:40:00] | |
[20:40:00] | Checking the latest YSI version.. |
[20:40:00] | |
[20:40:00] =======================================
[20:40:00]
[20:40:00]
----------------------------------
[20:40:00] Blank Gamemode by your name here
[20:40:00] ----------------------------------
[20:40:00] Number of vehicle models: 1
[20:40:00]
[20:40:00] ========================================
[20:40:00] | |
[20:40:00] | Could not connect to update server |
[20:40:00] | at this time, (your code will |
[20:40:00] | still work (response was 301)). |
[20:40:00] | |
[20:40:00] ========================================
[20:40:00]
[20:40:22] [connection] 127.0.0.1:60579 requests connection cookie.
[20:40:23] [connection] incoming connection: 127.0.0.1:60579 id: 0
[20:40:23] [join] Nesa_Djordjevic has joined the server (0:127.0.0.1)
>>>>>vidite ovo sta je ovo ?[20:40:39] sscanf warning: Format specifier does not match parameter count.[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): link slike
[pawn]CMD:whisper(playerid,params[])
{
new id,text[20],str[500];
if(sscanf(params, "us[20]",id, text)) return SCM(playerid,-1,"USAGE: /whisper [playerid] [text - max 200karaktera]");
if( strlen( text ) > 20) return SCM(playerid,-1,"Max 20 karaktera moze sadrzati text koji zelite sapnuti drugom igracu"); // Primer
format(str,sizeof(str), "%s ti sapuce: %s",GetName(playerid),text);
SCM(id,-1,str);
return 1;
}[/pawn]
Citat: xLanmi poslato Mart 22, 2020, 20:57:25 POSLE PODNE
[pawn]CMD:whisper(playerid,params[])
{
new id,text[20],str[500];
if(sscanf(params, "us[20]",id, text)) return SCM(playerid,-1,"USAGE: /whisper [playerid] [text - max 200karaktera]");
if( strlen( text ) > 20) return SCM(playerid,-1,"Max 20 karaktera moze sadrzati text koji zelite sapnuti drugom igracu"); // Primer
format(str,sizeof(str), "%s ti sapuce: %s",GetName(playerid),text);
SCM(id,-1,str);
return 1;
}[/pawn]
Krece svada zasto string 500 za 3 2 1...
Ova tema je zakljucana....Lock.