Please help me!
#1

Hello everyone!


PHP код:
public OnPlayerCommandText(playerid)
{
    if(!
strcmp(cmdtext"/piscina"true))
    {
    new 
myobject CreateObject(1935300100.00.090.0);
    
SetObjectMaterialText(myobject"Sa-mp {FFFFFF}oXiGen{008500}Creat {FF8200}or"0OBJECT_MATERIAL_SIZE_256x128);
    
"Arial"2800xFFFF82000xFF000000OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
     }
  return 
1;

Errors:
PHP код:
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 029invalid expressionassumed zero
C
:\Users\oXiGen\Desktop\Untitled.pwn(35) : warning 215expression has no effect
C
:\Users\oXiGen\Desktop\Untitled.pwn(35) : warning 215expression has no effect
C
:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 001expected token";"but found ")"
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 029invalid expressionassumed zero
C
:\Users\oXiGen\Desktop\Untitled.pwn(35) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line:
35:
PHP код:
 if(!strcmp(cmdtext"/piscina"true)) 
Please help me !!
Reply
#2

Try to change it to this:

pawn Код:
if(!strcmp(cmdtext, "/piscina", true, 8))
Pretty sure you need a string length of the command, of which is 8.

And change the setObjectMaterialText to this:

pawn Код:
SetObjectMaterialText(myobject, "Sa-mp {FFFFFF}oXiGen{008500}Creat {FF8200}or", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
Reply
#3

It is equally

Quote:

C:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 029: invalid expression, assumed zero
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 001: expected token: ";", but found ")"
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : error 029: invalid expression, assumed zero
C:\Users\oXiGen\Desktop\Untitled.pwn(35) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#4

Just noticed why I think it does that.

Change this:

pawn Код:
public OnPlayerCommandText(playerid)
{
With this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
You forgot the cmdtext parameter.
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid)
{
    if(!strcmp(cmdtext, "/piscina", true))
    {
    new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0);
    SetObjectMaterialText(myobject, "Sa-mp {FFFFFF}oXiGen{008500}Creat {FF8200}or", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
     }
  return 1;
}
Reply
#6

What was the use of that comment? I literally posted the SAME thing just a few minutes ago, except you did not have 2 lines.
Reply
#7

Quote:
Originally Posted by Kindred
Посмотреть сообщение
What was the use of that comment? I literally posted the SAME thing just a few minutes ago, except you did not have 2 lines.
Didnt noticed your comment. My bad.
Reply
#8

Idem errors,is line 35 :
Quote:

if(!strcmp(cmdtext, "/piscina", true))

Reply
#9

make sure that
pawn Код:
#include <a_samp>
Reply
#10

Did you do what I said in my second to last post from here? ((Now, third to last)).

It should fix your problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)