Author Topic: Weapon Error, a moved topic  (Read 1548 times)

moved

I made a Gas Powered Stick weapon
Name of file: Weapon_GPS.zip
and I put it into blockland and I opened it (has all dts files and stuffys)
But it says in the console
Loading Server.cs
Loading Weapon_GPS.cs
0 Datablocks Loaded.

HELP ME NOW!

For more help, ill send the link, http://app.box.com/s/nxgo6u5w24mg14wheu5w



First of all, not sure if this matters, but capitilise your Server.cs
Second, in the console, it doesn't say it executed your Weapon_GPS.cs - Look into that
Third, here

Code: [Select]
%errorA = ForceRequiredAddOn("Weapon_Sword");

if(%errorA == $Error::AddOn_Disabled)
   SwordItem.uiName = "";

else if(%errorA == $Error::AddOn_NotFound)
   error("You starfish! You need Weapon_Sword to run Weapon_GPS! IDIOT!!!");
else
exec("./Weapon_GPS.cs");
 

Your
if(%errorA == $Error::AddOn_Disabled)
   SwordItem.uiName = "";

said GPSItem. It needed to load sword. so fix that.

Anyway, make sure you can get it to load your weapon.cs

Good luck.

First of all, not sure if this matters, but capitalize your Server.cs
It doesn't, server.cs can be capitalized, lower case, or derp case, as long as its some way of spelling server.cs then all is well.

It doesn't, server.cs can be capitalized, lower case, or derp case, as long as its some way of spelling server.cs then all is well.
Ah. Good to know

I don't see how it would exec the file, report no syntax errors, but load no datablocks.
I'll just give tips about best practices instead

HELP ME NOW!
Asking like this oftentimes makes people less inclined to help you

error("You starfish! You need Weapon_Sword to run Weapon_GPS! IDIOT!!!");
Never write messages like this, especially if you plan to release it

Naming it "GPS" is ambiguous as many people would think it's referring to 'global positioning system'

Get rid of the MACOSX folder

I can't find any sword dependencies, so (unless I missed something) requiring it is pointless


« Last Edit: January 09, 2014, 02:08:40 PM by Headcrab Zombie »

I think it should do something like this:

if(%error=ForceRequiredAddOn("Weapon_Sword") == $Error::AddOn_Disabled)
{
   error("Weapon_Sword is not enabled! Will not execute...");
   return; //If it doesn't exist, why keep going?
}

exec("./Weapon_GPS.cs");


It worked thanks to the new loadup script!
YAY!
But here is a suprise!

no lol
The link to my Gas Powered Stick v.3829 is here: https://app.box.com/s/0ouqscjp8c2f4mj0bc5e

It worked thanks to the new loadup script!
YAY!
But here is a suprise!
-snip-
no lol
The link to my Gas Powered Stick v.3829 is here: -snip-
And nobody likes to help me. :(

It worked thanks to the new loadup script!
Except the "loadup script" was never the problem; if it was, weapon_GPS.cs wouldn't have been executed
In fact, the new one is less functional than the old one
Additionally, as I mentioned in a previous post that you completely ignored, this part is completely unnecessary because your weapon doesn't have any sword dependencies.