Quick Answer...
#1

IM making gate,, and i have little problem with SentClientMessage

C:\Documents and Settings\xy\Desktop\SAMP\samp03csvr_win32\gamemode s\rp3.pwn(467) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

code:

PHP код:
 if(strcmp(cmdtext"/flyo"true) == 0)
           {
            new 
string[1];
            new 
movetime MoveObject(helipad2548.59000000,-2797.09000000,13.06000000,5.00000000);
                   
SetTimer("aclose2"30000);
                   
SendClientMessage(playerid"You opening a hunter cage , gate will be closed for 3 seconds.");
            
format(stringsizeof(string), "Object will finish moving in %d milliseconds"movetime);
            return 
1;
            } 
Reply
#2

What's the line? By the way, make your string size bigger (not 256 yet) or it will only show a "O"
Reply
#3

Wrong code:
PHP код:
new string[1]; 
---------------
Is this your solution/answer?
PHP код:
new string[128]; 
Reply
#4

can you fix this please
Reply
#5

Why you need to create and format the string if time is always 3000 miliseconds? It's a static time, it won't change regarding of the player command.
pawn Код:
if(strcmp(cmdtext, "/flyo", true) == 0)
           {
            new movetime = MoveObject(helipad2, 548.59000000,-2797.09000000,13.06000000,5.00000000);
                   SetTimer("aclose2", 3000, 0);
                   SendClientMessage(playerid, "You opening a hunter cage , gate will be closed for 3 seconds.");
            SendClientMessage(playerid, "Object will finish moving in 3000 milliseconds");
            return 1;
            }
Reply
#6

pawn Код:
if(strcmp(cmdtext, "/flyo", true) == 0)
           {
            new movetime = MoveObject(helipad2, 548.59000000,-2797.09000000,13.06000000,5.00000000);
                   SetTimer("aclose2", 3000, 0);
                   SendClientMessage(playerid,-1, "You opening a hunter cage , gate will be closed for 3 seconds.");
            SendClientMessage(playerid, "Object will finish moving in 3000 milliseconds");
            return 1;
            }
You had missing a param in the SendClientMessage format.. (color)

pawn Код:
SendClientMessage(playerid,color,message);
Reply
#7

Its work now ,, thanks guys ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)