I suppose you are using this library?
[color=red]int[/color] denda;
...
denda = (p-20)*500;
...
denda = (p-27)*500;
...
char ngirim = ([color=red]char[/color]) denda;
seems really really weird
and
char ngirim = (char) denda;
...
sms.SendSMS("+6285741119138", ([color=red]ngirim[/color]));}
is definitely (one of) your problem(s) as the signature of sendSMS() is
char SendSMS(char *number_str, [color=red]char *message_str[/color]);