1 command pissing me off with errors which i cant fix like symbol is never used but i used it :|
#1

simple thing i made a space ship script and im trying to make a retroburners script but its producing lots of errors btw im using a edited version of G_ObjectsRot i edited (that is not causing any problems the script is) but its producing lots of errors here they are:
Код:
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(349) : error 035: argument type mismatch (argument 1)
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(349) : error 035: argument type mismatch (argument 1)
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(350) : error 035: argument type mismatch (argument 3)
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(346) : warning 203: symbol is never used: "string"
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(345) : warning 203: symbol is never used: "z"
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(345) : warning 203: symbol is never used: "y"
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\GAMEMO~1\bare.pwn(345) : warning 203: symbol is never used: "x"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
and the code itself:

Код:
	if(strcmp("/RetroBurners_Initiate", cmdtext, true) == 0)
	{
		new Float:RotX,Float:RotY,Float:RotZ;
		new Float:x, Float:y, Float:z;
		new string;
		GetObjectRot(Docking_Port, RotX, RotY, RotZ);
		GetObjectPos(Docking_Port, X, Y, Z);
		format(string, sizeof(string),"Current Rotational Axis and Position Of ISS Docking Port: %f, %f, %f, Location: %f, %f, %f", RotX, RotY, RotZ, x, y, z);
		SendClientMessage(playerid, Yellow, string);
		RotateDynamicObject(Docking_Port, RotX, RotY, 0.0, 90, 1);
		return 1;
	}
Can anyone help me with this all the errors seem to be on this line which is LINE 346:
Код:
new string;
And This One which is LINE 345:
Код:
new Float:x, Float:y, Float:z;
and line 349 is
Код:
format(string, sizeof(string),"Current Rotational Axis and Position Of ISS Docking Port: %f, %f, %f, Location: %f, %f, %f", RotX, RotY, RotZ, x, y, z);
and line 350 is
Код:
SendClientMessage(playerid, Yellow, string);
please help me on this thanks
Reply
#2

pawn Код:
if(strcmp("/RetroBurners_Initiate", cmdtext, true) == 0)
    {
        new Float:RotX,Float:RotY,Float:RotZ;
        new Float:x, Float:y, Float:z;
        new string[128];
        GetObjectRot(Docking_Port, RotX, RotY, RotZ);
        GetObjectPos(Docking_Port, x, y, z);
        format(string, sizeof(string),"Current Rotational Axis and Position Of ISS Docking Port: %f, %f, %f, Location: %f, %f, %f", RotX, RotY, RotZ, x, y, z);
        SendClientMessage(playerid, Yellow, string);
        RotateDynamicObject(Docking_Port, RotX, RotY, 0.0, 90, 1);
        return 1;
    }
Try it like this, this should atleast get rid of the string error

Edit:
Hope this will work
Reply
#3

Variable names are case sensitive. Change line GetObjectPos(Docking_Port, X, Y, Z) to GetObjectPos(Docking_Port, x, y, z)
Reply
#4

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
if(strcmp("/RetroBurners_Initiate", cmdtext, true) == 0)
    {
        new Float:RotX,Float:RotY,Float:RotZ;
        new Float:x, Float:y, Float:z;
        new string[128];
        GetObjectRot(Docking_Port, RotX, RotY, RotZ);
        GetObjectPos(Docking_Port, x, y, z);
        format(string, sizeof(string),"Current Rotational Axis and Position Of ISS Docking Port: %f, %f, %f, Location: %f, %f, %f", RotX, RotY, RotZ, x, y, z);
        SendClientMessage(playerid, Yellow, string);
        RotateDynamicObject(Docking_Port, RotX, RotY, 0.0, 90, 1);
        return 1;
    }
Try it like this, this should atleast get rid of the string error

Edit:
Hope this will work
got rid of everthing todo with errors ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)