SA-MP Forums Archive
Computer System Issue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Computer System Issue (/showthread.php?tid=433867)



Computer System Issue - Jay_Dixon - 29.04.2013

Ok, since you guys are so epic at helping me, i figured i'd make this post.

So, it's saying this thing aint' defined

I always miss the small things, so what'd i do wrong? D:

C:\Users\Jay\Desktop\FRP\gamemodes\FRP.pwn(2355) : error 017: undefined symbol "PC"

Here's the script

Код:
stock CreatePC(playerid,name[],ram,processor,videocard,diskspace,windows)
{
	new zname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,zname,sizeof(zname));
	
	new file[256];
	format(file,sizeof(file),PCFile,zname);
	
	PC_File[playerid][RAM] = ram;
	PC_File[playerid][Processor] = processor;
	PC_File[playerid][VideoCard] = videocard;
	PC_File[playerid] Diskspace] = diskspace;
	PC_File[playerid][Windows] = windows;
	
	NetInstalled[playerid] = 0;
	HavePC[playerid] = 1;
	IsPCVirused[playerid] = 0;
	
	if(!dini_Exists(file))
	{
	    dini_Create(file);
	    dini_Set(file,"PCOwner",name);
	    dini_IntSet(file,"RAM",ram);
	    dini_IntSet(file,"Processor",processor);
	    dini_IntSet(file,"Diskspace",diskspace);
	    dini_IntSet(file,"VideoCard",videocard);
	    dini_IntSet(file,"Window",windows);
	    dini_IntSet(file,"NetInstaled",0);
	    dini_IntSet(file,"NetSpeed",0);
	    dini_IntSet(file,"AntiVirus",0);
	    dini_IntSet(file,"Messenger",0);
	    NoVirus(playerid);
	}
	return 1;
}



Re: Computer System Issue - Lordzy - 30.04.2013

Can you point out which line actually gives the Error?


AW: Computer System Issue - [AK]Nazgul - 30.04.2013

pawn Код:
PC_File[playerid] Diskspace] = diskspace; // a '[' is missing here
Change this line to
pawn Код:
PC_File[playerid][Diskspace] = diskspace;



Re: AW: Computer System Issue - Jay_Dixon - 30.04.2013

It's giving the same problem

It seems that this is the problem one, i don't see the issue though

Код:
format(file,sizeof(file),PCFile,zname);
Код:
stock CreatePC(playerid,name[],ram,processor,videocard,diskspace,windows)
{
	new zname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,zname,sizeof(zname));
	
	new file[256];
	format(file,sizeof(file),PCFile,zname);
	
	PC_File[playerid][RAM] = ram;
	PC_File[playerid][Processor] = processor;
	PC_File[playerid][VideoCard] = videocard;
	PC_File[playerid][Diskspace] = diskspace;
	PC_File[playerid][Windows] = windows;
	
	NetInstalled[playerid] = 0;
	HavePC[playerid] = 1;
	IsPCVirused[playerid] = 0;
	
	if(!dini_Exists(file))
	{
	    dini_Create(file);
	    dini_Set(file,"PCOwner",name);
	    dini_IntSet(file,"RAM",ram);
	    dini_IntSet(file,"Processor",processor);
	    dini_IntSet(file,"Diskspace",diskspace);
	    dini_IntSet(file,"VideoCard",videocard);
	    dini_IntSet(file,"Window",windows);
	    dini_IntSet(file,"NetInstaled",0);
	    dini_IntSet(file,"NetSpeed",0);
	    dini_IntSet(file,"AntiVirus",0);
	    dini_IntSet(file,"Messenger",0);
	    NoVirus(playerid);
	}
	return 1;
}