Author Topic: addon making  (Read 892 times)

So, I made this Sniper, and I put it in BL but in not showing up in the items menu, I went to go check the console.log
and it said that the weapon was invalid

Is it something with the script or watever?

post console.log so we can see what's wrong with the add-on

Did you package the add-on correctly? Check for any syntax or packaging errors.

magic



Suspicious in console.log:

Code: [Select]
Loading Add-On: Weapon_Gun (CRC:1127943675)
Add-Ons/Weapon_Gun/server.cs Line: 381 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^stateSequence[4]                = "Reload";

^stateTransitionOnTriggerUp[4]     = "Ready";

^stateSequence[4]^= "Ready";



};



function gunImage::onFire(%this,%obj,%slot)

{

^if(%obj.getDamagePercent() < 1.0)

^^%obj.playThread(2, shiftLeft);

^^%obj.playThread(0, shiftRight

^Parent:##:##onFire(%this,%obj,%slot);

}


>>> Error report complete.

ADD-ON "Weapon_Gun" CONTAINS SYNTAX ERRORS
Code: [Select]
ERROR: Invalid add-on 'Weapon_SniperRifle' specified for game mode 'Add-Ons/GameMode_Addon_Testing/gamemode.txt'
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadGameModeAddOns

Also, what the hell is
Code: [Select]
GameMode_Addon_Testing?


Isnt anyone gonna help?

DerpDerp post your addon in Coding Help. The console.log states that this is a syntax error which means that you will receive better help in coding help