p2p_send

Posted by andiprasetyo
how to send string on p2p_send function, i always failed sent string or real with gms_p2p_send(id,target,"string to sent") like this
whats my mistakes? thanks
from indonesia

Replies (3)

Last message on 27 Nov 2018

Size43 (Administrator) on 27 Nov 2018, 16:09:30
What code are you using to receive the p2p messages? (i.e. what does your script that you set in gms_script_set_p2p look like?)
andiprasetyo (Topicstarter) on 27 Nov 2018, 16:54:35
the script like this
var mid = argument0, sender = argument1, args = argument2;
switch mid
{
case p2p_trade_additem:
box=instance_create(xbox,ybox,obj_item_trade2)
box.data = args
break;
default:
show_error("Unknown p2p message with message id " + string(mid) + " received!", true)
}
my question
does argument2 have to be ds_list?
if yes, how to sent the ds_list and read ds_list
how many arguments can be made in gms_send?
andiprasetyo (Topicstarter) on 27 Nov 2018, 18:45:36
fixed----
i made change with

args=argument2[|0]

and anything fine

closed-----