Need Help [Error 035] [+REP]
#1

Quote:

COMMAND:createteleport(playerid, params[])
{
if(PlayerInfo[playerid][power] < 9) return SendClientError(playerid, CANT_USE_CMD);
new tpNames;
new hid=ReturnNextUnusedTeleport();
if(sscanf(params, "sz", hid ,tpNames)) return SCP(playerid, "[Faction ID] [Teleport Name]");
// if( sscanf ( params, "d", id)) return SCP(playerid, "[FACTION ID / 255 civ]");
SendClientMSG(playerid,COLOR_GREY, "Teleport [ID: %d] [Teleport Name: %s].",hid,tpNames);
new hf[64];
new Float: X, Float: Y, Float: Z;
new blazer = GetPlayerInterior(playerid);
new giordino = GetPlayerVirtualWorld(playerid);
GetPlayerPos(playerid,X,Y,Z);
format(hf,sizeof(hf),"teleports/teleport%d.txt",hid);
if(!dini_Exists(hf))
{
dini_Create(hf);
dini_Set(hid,"tpName", tpNames); // line "20815"
myStrcpy(biz[hid][tpName],tpNames); // line "20816"
dini_IntSet(hf,"teleportid",hid);
dini_IntSet(hf,"startinterior",blazer);
dini_IntSet(hf,"startvirtualworld",giordino);
dini_IntSet(hf,"endtvirtualworld",0);
dini_IntSet(hf,"endinterior",0);
dini_FloatSet(hf,"startfloatx",X);
dini_FloatSet(hf,"startfloaty",Y);
dini_FloatSet(hf,"startfloatz",Z);
dini_IntSet(hf,"endfloatx",0);
dini_IntSet(hf,"endfloaty",0);
dini_IntSet(hf,"endfloatz",0);
CreateNewTeleport(hid);
return 1;
}
return 1;
}

Okay so i've tried to make one command for my server, and it dosent work.

Quote:

C:\Users\User\Desktop\GC-RP.pwn(20815) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\GC-RP.pwn(20816) : warning 213: tag mismatch
C:\Users\User\Desktop\GC-RP.pwn(20816) : error 035: argument type mismatch (argument 2)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Quote:

dini_Set(hid,"tpName", tpNames); == C:\Users\User\Desktop\GC-RP.pwn(20815) : error 035: argument type mismatch (argument 1)
myStrcpy(biz[hid][tpName],tpNames); == C:\Users\User\Desktop\GC-RP.pwn(20816) : error 035: argument type mismatch (argument 2)

Reply
#2

bump anyone fast pls?
Reply
#3

Ok so, I guess that you copy that code from somewhere, second you are using sscanf wrongly:
PHP код:
sscanf(params"sz"hid ,tpNames
So I noticed that hid is variable which is carrying info from function ReturnNextUnusedTeleport(); but return from this function is integer or string, that is my first question and second which specifier in sscanf fucntion is "z" I am not looking and I haven`t saw that specifier yet. Oh by the way this are the correct specifiers:
Reply
#4

Quote:
Originally Posted by Sanady
Посмотреть сообщение
Ok so, I guess that you copy that code from somewhere, second you are using sscanf wrongly:
PHP код:
sscanf(params"sz"hid ,tpNames
So I noticed that hid is variable which is carrying info from function ReturnNextUnusedTeleport(); but return from this function is integer or string, that is my first question and second which specifier in sscanf fucntion is "z" I am not looking and I haven`t saw that specifier yet. Oh by the way this are the correct specifiers:
okay thanks but what should i do with dini_set how to fix that?


Quote:

dini_Set(hid,"tpName", tpNames);
myStrcpy(biz[hid][tpName],tpNames);

Reply
#5

Quote:
Originally Posted by LondonRP
Посмотреть сообщение
okay thanks but what should i do with dini_set how to fix that?
Firstly fix that what I posted then you will see what compiler will output you and post it here.
Reply
#6

Quote:
Originally Posted by Sanady
Посмотреть сообщение
Firstly fix that what I posted then you will see what compiler will output you and post it here.
Quote:

C:\Users\User\Desktop\GC-RP.pwn(20814) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\GC-RP.pwn(20815) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase.

same lines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)