What wrong in here.
#1

Hi all.I have a question with a message save.Here is my script:

Код:
COMMAND:pm(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new SenderID,MessageID [ 30 ];
if (sscanf(params, "us[20]", SenderID,MessageID)){SendClientMessage(playerid, COLOR_ORANGE, "* Send message for player: /pm [part of name] [message]");return 1;}
if( SenderID == INVALID_PLAYER_ID ){SendClientMessage( playerid, 0xFFFFFFFF, "* This player do not exist" );return 1;}
if( strlen( MessageID ) > 20 ) return SendClientMessage( playerid, 0xFFFFFFFF, "* Message too long [MAX:20]" );
Код:
PlayerData[SenderID][PhoneMessage] = strlen( MessageID[20] );
Код:
new String20 [ 20 ];
format ( String20, 20, "%s",strlen(PlayerData[playerid][PhoneMessage]));
SendClientMessage(playerid,COLOR_GREEN,String20);
And how you see this:

Код:
PlayerData[SenderID][TelefonoZinute]
i want to save in this message:and i use

Код:
strlen( MessageID[20] );
and then i test:

Код:
new String20 [ 20 ];
format ( String20, 20, "%s",strlen(PlayerData[playerid][PhoneMessage]));
SendClientMessage(playerid,COLOR_GREEN,String20);
But in this code i get wrong message,i don't get message only empty message like that:

Код:
SendClientMessage(playerid,COLOR_GREEN,"                                            ");
Maybe i use this wrong :

Код:
strlen( MessageID[20] );
Or maybe i use others things bad...
Reply


Messages In This Thread
What wrong in here. - by budelis - 04.08.2011, 12:53
Re: What wrong in here. - by Sascha - 04.08.2011, 14:29
Re: What wrong in here. - by budelis - 04.08.2011, 17:12
Re: What wrong in here. - by Kush - 04.08.2011, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)