My NPC has warning
#1

Код:
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(30) : warning 202: number of arguments does not match definition
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(21) : warning 204: symbol is assigned a value that is never used: "Actor1"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(30) : warning 204: symbol is assigned a value that is never used: "Actor10"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(22) : warning 204: symbol is assigned a value that is never used: "Actor2"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(23) : warning 204: symbol is assigned a value that is never used: "Actor3"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(24) : warning 204: symbol is assigned a value that is never used: "Actor4"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(25) : warning 204: symbol is assigned a value that is never used: "Actor5"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(26) : warning 204: symbol is assigned a value that is never used: "Actor6"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(27) : warning 204: symbol is assigned a value that is never used: "Actor7"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(28) : warning 204: symbol is assigned a value that is never used: "Actor8"
C:\Users\LкVх\Downloads\Compressed\NGG V5.1\filterscripts\acto.pwn(29) : warning 204: symbol is assigned a value that is never used: "Actor9"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Warnings.
Код:
#include <a_samp>
#include <a_actor>

new Actor1;
new Actor2;
new Actor3;
new Actor4;
new Actor5;
new Actor6;
new Actor7;
new Actor8;
new Actor9;
new Actor10;

public OnGameModeInit()
{
    Actor1 = CreateActor(155, -1719.6086, 1363.2816, 7.1875, 54.0771); // job pizza sf
    Actor2 = CreateActor(155, -1712.7937, 1349.6168, 7.1826, 109.1409); // laybanh sf
    Actor3 = CreateActor(27, -1560.3833, 127.7313, 3.5547 ,135.1479); // trucker xe
    Actor4 = CreateActor(61, -1980.6091, 132.9184, 27.6875, 97.3857); // job taxi sf
    Actor5 = CreateActor(6, -2032.8424, 144.2678, 28.8359, 271.7690); //job sua xe sf
    Actor6 = CreateActor(17,  -2269.5171,-157.8945 ,35.3203, 264.0515); // job ve si sf
    Actor7 = CreateActor(23, -2623.5823, 209.0910, 4.6780, 4.2683); // job ban vu khi sf
    Actor8 = CreateActor(42, 2195.8450, -1972.8000, 13.5589, 180.3337); // job tho thu cong ls
    Actor9 = CreateActor(29, 2166.2922, -1675.4791, 15.0859, 221.5491);// buon ma tuy ls
    Actor10 = CreateActor(29, -2053.69, 1222.65, 31.64);// cho~ ban' sung
    return 1;
}
it's doesn't create Actor in game @@ how to fix it
Reply
#2

First Of All They Are Not NPC They Are Actors
Reply
#3

The actor variables aren't actually defined to anything.
Reply
#4

pawn Код:
Actor10 = CreateActor(29, -2053.69, 1222.65, 31.64);// cho~ ban' sung
The 4th parameter which is rotation is missing.

You might as well take a look at arrays instead of having 10 separate variables for storing actor IDs.
Reply
#5

i has 1 waring : (20) : warning 202: number of arguments does not match definition

Code : Actor[0] = CreateActor(155, -1719.6086, 1363.2816, 7.1875, 54.0771); // job pizza sf
Actor[1] = CreateActor(155, -1712.7937, 1349.6168, 7.1826, 109.1409); // laybanh sf
Actor[2] = CreateActor(27, -1560.3833, 127.7313, 3.5547 ,135.1479); // trucker xe
Actor[3] = CreateActor(61, -1980.6091, 132.9184, 27.6875, 97.3857); // job taxi sf
Actor[4] = CreateActor(6, -2032.8424, 144.2678, 28.8359, 271.7690); //job sua xe sf
Actor[5] = CreateActor(17, -2269.5171,-157.8945 ,35.3203, 264.0515); // job ve si sf
Actor[6] = CreateActor(23, -2623.5823, 209.0910, 4.6780, 4.2683); // job ban vu khi sf
Actor[7] = CreateActor(42, 2195.8450, -1972.8000, 13.5589, 180.3337); // job tho thu cong ls
Actor[8] = CreateActor(29, 2166.2922, -1675.4791, 15.0859, 221.5491);// buon ma tuy ls
Actor[9] = CreateActor(29, -2053.69, 1222.65, 31.64);// cho~ ban' sung
return 1;
Reply
#6

The problem is Actor[9] didn't have an angle set, so I've set it to 0.0

pawn Код:
Actor[0] = CreateActor(155, -1719.6086, 1363.2816, 7.1875, 54.0771); // job pizza sf
Actor[1] = CreateActor(155, -1712.7937, 1349.6168, 7.1826, 109.1409); // laybanh sf
Actor[2] = CreateActor(27, -1560.3833, 127.7313, 3.5547 ,135.1479); // trucker xe
Actor[3] = CreateActor(61, -1980.6091, 132.9184, 27.6875, 97.3857); // job taxi sf
Actor[4] = CreateActor(6, -2032.8424, 144.2678, 28.8359, 271.7690); //job sua xe sf
Actor[5] = CreateActor(17, -2269.5171,-157.8945 ,35.3203, 264.0515); // job ve si sf
Actor[6] = CreateActor(23, -2623.5823, 209.0910, 4.6780, 4.2683); // job ban vu khi sf
Actor[7] = CreateActor(42, 2195.8450, -1972.8000, 13.5589, 180.3337); // job tho thu cong ls
Actor[8] = CreateActor(29, 2166.2922, -1675.4791, 15.0859, 221.5491);// buon ma tuy ls
Actor[9] = CreateActor(29, -2053.69, 1222.65, 31.64, 0.0);// cho~ ban' sung
Reply
#7

Solved !!!
thanks for help me
Reply
#8

Obviously you'll have to set the correct angle for the Actor[9].
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)