SA-MP Forums Archive
How to use this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to use this? (/showthread.php?tid=580542)



How to use this? - Mouiz - 06.07.2015

I want to create the object which object id is typed in INPUT BOX but i get an error

Код:
C:\Users\Mouiz\Desktop\FreeRoam\filterscripts\objectedit.pwn(32) : error 006: must be assigned to an array
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
The code: (it gives the error for the highlighted line)
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
		
Код:
object = inputtext;
CreateObject(object, x, y, z, 0.0, 0.0, 0.0);
}
}
return 1;
}
Can you tell me how to make it create the object which i enter in the Input box?


Re: How to use this? - X337 - 06.07.2015

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
        new Float:x,Float:y,Float:z,objid;
        GetPlayerPos(playerid, x, y, z);
        objid = strval(inputtext);

		CreateObject(objid, x, y, z, 0.0, 0.0, 0.0);
        }
    }
    return 1;



Re: How to use this? - Mouiz - 06.07.2015

Quote:
Originally Posted by X337
Посмотреть сообщение
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
        new Float:x,Float:y,Float:z,objid;
        GetPlayerPos(playerid, x, y, z);
        objid = strval(inputtext);

		CreateObject(objid, x, y, z, 0.0, 0.0, 0.0);
        }
    }
    return 1;
Thanks it worked