How to fix arguement type mistmatch (arguement 1)?
#1

I put a house system in my gamemode but when compiling i got these errors:
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34030) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34030) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34031) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34033) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34035) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34037) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34039) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34041) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34043) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34045) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34047) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(3404 : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34051) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34055) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34056) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34057) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(3405 : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34059) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34072) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34073) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34074) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34075) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34076) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34077) : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(3407 : error 035: argument type mismatch (argument 1)
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(34079) : error 035: argument type mismatch (argument 1)

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


26 Errors.

Here is the piece of code that has these errors.

Код:
AH(hi, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora)
{
	new house[256];
	 format(house, sizeof(house), "Houses/hi%d",hi); < Error Line
	 if(!dini_Exists(house))  < Error Line
	{
		dini_Create(house); < Error line
		format(hInfo[hi][Name], 24, "ForSale");
		dini_Set(house, "Name", "ForSale"); < Error Line
		format(hInfo[hi][Renter], 24, "ForRent");
		dini_Set(house, "Renter", "ForRent"); < Error Line
		hInfo[hi][Rentable] = 0;
		dini_IntSet(house, "Rentable", 0); < Error Line
		hInfo[hi][Rentcost] = 0;
		dini_IntSet(house, "Rentcost", 0); < Error Line
		hInfo[hi][Cost] = Costa;
		dini_IntSet(house, "Cost", Costa+00000); < Error Line
		hInfo[hi][Sell] = Sella;
		dini_IntSet(house, "Sell", Sella); < Error Line
		hInfo[hi][Interior] = Interiora;
		dini_IntSet(house, "Interior", Interiora); < Error Line
		dini_IntSet(house, "Virtualworld", hi);
		hInfo[hi][Virtualworld] = hi; < Error Line
		hInfo[hi][Locked] = 1; < Error Line
		dini_IntSet(house, "Locked", 1);
		hInfo[hi][InteriorX] = interiorX;
		hInfo[hi][InteriorY] = interiorY; < Error Line
		hInfo[hi][InteriorZ] = interiorZ;
		dini_FloatSet(house, "X", interiorX);
		dini_FloatSet(house, "Y", interiorY);
		dini_FloatSet(house, "Z", interiorZ); < Error Line
		dini_IntSet(house, "RentPay", 0); < Error Line
		dini_IntSet(house, "RentGet", 0); < Error Line
		print("-"); < Error Line
		print("--------------House Created--------------");
		printf("- hi: %d", hi);
		printf("- Buy Cost: %d", Costa+0000);
		printf("- Sell Cost: %d", Sella);
		printf("- Interior: %d", Interiora);
		printf("- VirtualWorld: %d", hi);
		print("-----------------------------------------");
		print("-");
	}
	else
	{
	    format(hInfo[hi][Name], 24, dini_Get(house, "Name")); < Error Line
	    format(hInfo[hi][Renter], 24, dini_Get(house, "Renter")); < Error Line 
		hInfo[hi][Rentable] = dini_Int(house, "Rentable"); < Error Line
		hInfo[hi][Rentcost] = dini_Int(house, "Rentcost"); < Error Line
	    hInfo[hi][Cost] = dini_Int(house, "Cost"); < Error Line
	    hInfo[hi][Sell] = dini_Int(house, "Sell"); < Error Line
	    34078: hInfo[hi][Interior] = dini_Int(house, "Interior"); < Error Line
	    hInfo[hi][Locked] = dini_Int(house, "Locked"); < Error Line
	    hInfo[hi][InteriorX] = dini_Float(house, "X");
	    hInfo[hi][InteriorY] = dini_Float(house, "Y");
		hInfo[hi][InteriorZ] = dini_Float(house, "Z");
		hInfo[hi][Virtualworld] = dini_Int(house, "Virtualworld");
	}
Reply
#2

Usually when you get that error it means that you're using the funciton wrong.
function(argument 1, argument 2, argument 3 .. );

Its not always the problem but im too lazy to look through all those lines of codes and spot the problem.
Could you show what lines exactly you getting the errors on? for example " <-error line here"
Reply
#3

Quote:
Originally Posted by Edix
Посмотреть сообщение
Usually when you get that error it means that you're using the funciton wrong.
function(argument 1, argument 2, argument 3 .. );

Its not always the problem but im too lazy to look through all those lines of codes and spot the problem.
Could you show what lines exactly you getting the errors on? for example " <-error line here"
Ok i editted my post now it say < Error Line where the error line is.
Reply
#4

Quote:
Originally Posted by QatarKnight
Посмотреть сообщение
Ok i editted my post now it say < Error Line where the error line is.
It looks like you're using the dini functions in the wrong way cant really tell you whats wrong as im not really good with dini.

Check this topic: https://sampforum.blast.hk/showthread.php?tid=47131
and see if you used the functions as you should.
Reply
#5

Quote:
Originally Posted by Edix
Посмотреть сообщение
It looks like you're using the dini functions in the wrong way cant really tell you whats wrong as im not really good with dini.

Check this topic: https://sampforum.blast.hk/showthread.php?tid=47131
and see if you used the functions as you should.
The code compiles as a filterscript but not with my gamemode that's weird.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)