Whats wrong with SMS sys?
#1

Hello all. Re-created cmd to sscanf and zcmd, and its FUCKED UP When, i type /sms name text - idk, why sms sending to NecroTel...
And, here is:
command: http://pastebin.com/r6JMtaSJ
sendsms, and etc script: http://pastebin.com/m4MCJqpv
Help please. ;/
Reply
#2

If you've got the plugin, not the function (sscanf) then you have to do S[41] instead of z
Reply
#3

Nah, im using sscanf stock.
Reply
#4

new vardas[MAX_PLAYER_NAME],vardas2[MAX_PLAYER_NAME],atext[41], recieverid;
bolded part should be removed.
Reply
#5

Quote:
Originally Posted by MrObviousPotato
Посмотреть сообщение
new vardas[MAX_PLAYER_NAME],vardas2[MAX_PLAYER_NAME],atext[41], recieverid;
bolded part should be removed.
Dude, my server isnt created from new pawn lap, i re-created ~3k lines mode.. And in default cmd are:
Quote:

if(!strcmp(cmdtext,"/sms",true,4))
{
if(cmdtext[4]==0) {SendClientMessage(playerid,MELYNA, "usage: /sms [name] [text]"); return 1;}

new vardas[MAX_PLAYER_NAME],vardas2[MAX_PLAYER_NAME],atext[128];
strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);

if(!strcmp(vardas,"necrotel",true))
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));

strmid(atext,GetArgument(2, cmdtext,true),0,sizeof(atext));

if(!strcmp(atext,"0",true))
{
SendClientMessage(playerid,RAUDONA, "Sms with no text?!.");
return 1;
}

SetTimerEx("SMSsystem",(1+random(4))*1000,false,"i s",playerid,atext);
SendSMS(INVALID_PLAYER_ID,name,"NecroTel",atext,pl ayerid);
return 1;
}

if(playerDB[playerid][mobsas] < 2)
{
SendClientMessage(playerid,ZALIA3,"no money in your tel acc");
return 1;
}

new recieverid = GetPlayeridMid(vardas);

if(recieverid == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, ZALIA3, "no player.");
return 1;
}
strmid(atext,GetArgument(2, cmdtext,true),0,sizeof(atext));

if(!strcmp(atext,"0",true))
{
SendClientMessage(playerid, ZALIA3, "sms with no text?!.");
return 1;
}

GetPlayerName(playerid,vardas2,sizeof(vardas2));
GetPlayerName(recieverid,vardas,sizeof(vardas));

playerDB[playerid][mobsas]-=2;

SendSMS(recieverid,vardas2,vardas,atext,playerid);
return 1;
}

Reply
#6

Dude, just do it.
Reply
#7

Quote:
Originally Posted by MrObviousPotato
Посмотреть сообщение
Dude, just do it.
Than error for argument mistach. Because

SendSMS(recieverid,vardas2,vardas,atext,playerid);
Reply
#8

new vardas3[MAX_PLAYER_NAME];
GetPlayerName(vardas2, vardas3, MAX_PLAYER_NAME);
SendSMS(recieverid,vardas3,vardas,atext,playerid);
Reply
#9

Quote:

error 035: argument type mismatch (argument 1)
error 001: expected token: "-string end-", but found "-identifier-"
error 017: undefined symbol "yra"
error 017: undefined symbol "per"
fatal error 107: too many error messages on one line

5 Errors.

lines
1284 if(strlen(atext) < 1 || strlen(atext) > 40) return SendClientMessage(playerid,RAUDONA, "Ju^sё ?inute" yra per trumpa, arba per ilga. (<1, >40)");
up
1283 new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
1281 if(!strcmp(vardas2,"necrotel",true))
Reply
#10

You have a " inside the sendclientmessage message. and in the strcmp check you have to use vardas3 not vardas 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)